// ==UserScript==
// @name       rancher-utils
// @namespace  npm/vite-plugin-monkey
// @version    1.0.0
// @author     ChenBin
// @icon       https://www.rancher.cn/imgs/rancher-prime/favicon.png
// @match      *://rancher.59iedu.com/*/*/*
// @require    https://cdn.jsdelivr.net/npm/vue@3.4.14/dist/vue.global.prod.js
// @grant      GM_addStyle
// ==/UserScript==

(d=>{if(typeof GM_addStyle=="function"){GM_addStyle(d);return}const t=document.createElement("style");t.textContent=d,document.head.append(t)})(" #main[data-v-60cddf3d]{position:fixed;top:50%;right:10px;z-index:10086;min-width:100px;padding:10px;border:1px solid #cacaca;background:#fff} ");

(function (vue) {
  'use strict';

  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var require_main_001 = __commonJS({
    "main-04d80da4.js"(exports, module) {
      function happensIn(e, dataSetPropName) {
        let { target } = e;
        while (target) {
          if (target.dataset) {
            if (target.dataset[dataSetPropName] !== void 0)
              return true;
          }
          target = target.parentElement;
        }
        return false;
      }
      function getPreciseEventTarget(event) {
        return event.composedPath()[0] || null;
      }
      function depx(value) {
        if (typeof value === "string") {
          if (value.endsWith("px")) {
            return Number(value.slice(0, value.length - 2));
          }
          return Number(value);
        }
        return value;
      }
      function pxfy(value) {
        if (value === void 0 || value === null)
          return void 0;
        if (typeof value === "number")
          return `${value}px`;
        if (value.endsWith("px"))
          return value;
        return `${value}px`;
      }
      function getMargin(value, position) {
        const parts = value.trim().split(/\s+/g);
        const margin = {
          top: parts[0]
        };
        switch (parts.length) {
          case 1:
            margin.right = parts[0];
            margin.bottom = parts[0];
            margin.left = parts[0];
            break;
          case 2:
            margin.right = parts[1];
            margin.left = parts[1];
            margin.bottom = parts[0];
            break;
          case 3:
            margin.right = parts[1];
            margin.bottom = parts[2];
            margin.left = parts[1];
            break;
          case 4:
            margin.right = parts[1];
            margin.bottom = parts[2];
            margin.left = parts[3];
            break;
          default:
            throw new Error("[seemly/getMargin]:" + value + " is not a valid value.");
        }
        if (position === void 0)
          return margin;
        return margin[position];
      }
      function getGap(value, orient) {
        const [rowGap, colGap] = value.split(" ");
        if (!orient)
          return {
            row: rowGap,
            col: colGap || rowGap
          };
        return orient === "row" ? rowGap : colGap;
      }
      const colors = {
        black: "#000",
        silver: "#C0C0C0",
        gray: "#808080",
        white: "#FFF",
        maroon: "#800000",
        red: "#F00",
        purple: "#800080",
        fuchsia: "#F0F",
        green: "#008000",
        lime: "#0F0",
        olive: "#808000",
        yellow: "#FF0",
        navy: "#000080",
        blue: "#00F",
        teal: "#008080",
        aqua: "#0FF",
        transparent: "#0000"
      };
      const prefix$1 = "^\\s*";
      const suffix = "\\s*$";
      const float = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*";
      const hex = "([0-9A-Fa-f])";
      const dhex = "([0-9A-Fa-f]{2})";
      const rgbRegex = new RegExp(`${prefix$1}rgb\\s*\\(${float},${float},${float}\\)${suffix}`);
      const rgbaRegex = new RegExp(`${prefix$1}rgba\\s*\\(${float},${float},${float},${float}\\)${suffix}`);
      const sHexRegex = new RegExp(`${prefix$1}#${hex}${hex}${hex}${suffix}`);
      const hexRegex = new RegExp(`${prefix$1}#${dhex}${dhex}${dhex}${suffix}`);
      const sHexaRegex = new RegExp(`${prefix$1}#${hex}${hex}${hex}${hex}${suffix}`);
      const hexaRegex = new RegExp(`${prefix$1}#${dhex}${dhex}${dhex}${dhex}${suffix}`);
      function parseHex(value) {
        return parseInt(value, 16);
      }
      function rgba(color) {
        try {
          let i;
          if (i = hexRegex.exec(color)) {
            return [parseHex(i[1]), parseHex(i[2]), parseHex(i[3]), 1];
          } else if (i = rgbRegex.exec(color)) {
            return [roundChannel(i[1]), roundChannel(i[5]), roundChannel(i[9]), 1];
          } else if (i = rgbaRegex.exec(color)) {
            return [
              roundChannel(i[1]),
              roundChannel(i[5]),
              roundChannel(i[9]),
              roundAlpha(i[13])
            ];
          } else if (i = sHexRegex.exec(color)) {
            return [
              parseHex(i[1] + i[1]),
              parseHex(i[2] + i[2]),
              parseHex(i[3] + i[3]),
              1
            ];
          } else if (i = hexaRegex.exec(color)) {
            return [
              parseHex(i[1]),
              parseHex(i[2]),
              parseHex(i[3]),
              roundAlpha(parseHex(i[4]) / 255)
            ];
          } else if (i = sHexaRegex.exec(color)) {
            return [
              parseHex(i[1] + i[1]),
              parseHex(i[2] + i[2]),
              parseHex(i[3] + i[3]),
              roundAlpha(parseHex(i[4] + i[4]) / 255)
            ];
          } else if (color in colors) {
            return rgba(colors[color]);
          }
          throw new Error(`[seemly/rgba]: Invalid color value ${color}.`);
        } catch (e) {
          throw e;
        }
      }
      function normalizeAlpha(alphaValue) {
        return alphaValue > 1 ? 1 : alphaValue < 0 ? 0 : alphaValue;
      }
      function stringifyRgba(r, g, b, a) {
        return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${normalizeAlpha(a)})`;
      }
      function compositeChannel(v1, a1, v2, a2, a) {
        return roundChannel((v1 * a1 * (1 - a2) + v2 * a2) / a);
      }
      function composite(background, overlay2) {
        if (!Array.isArray(background))
          background = rgba(background);
        if (!Array.isArray(overlay2))
          overlay2 = rgba(overlay2);
        const a1 = background[3];
        const a2 = overlay2[3];
        const alpha = roundAlpha(a1 + a2 - a1 * a2);
        return stringifyRgba(compositeChannel(background[0], a1, overlay2[0], a2, alpha), compositeChannel(background[1], a1, overlay2[1], a2, alpha), compositeChannel(background[2], a1, overlay2[2], a2, alpha), alpha);
      }
      function changeColor(base2, options) {
        const [r, g, b, a = 1] = Array.isArray(base2) ? base2 : rgba(base2);
        if (options.alpha) {
          return stringifyRgba(r, g, b, options.alpha);
        }
        return stringifyRgba(r, g, b, a);
      }
      function scaleColor(base2, options) {
        const [r, g, b, a = 1] = Array.isArray(base2) ? base2 : rgba(base2);
        const { lightness = 1, alpha = 1 } = options;
        return toRgbaString([r * lightness, g * lightness, b * lightness, a * alpha]);
      }
      function roundAlpha(value) {
        const v = Math.round(Number(value) * 100) / 100;
        if (v > 1)
          return 1;
        if (v < 0)
          return 0;
        return v;
      }
      function roundChannel(value) {
        const v = Math.round(Number(value));
        if (v > 255)
          return 255;
        if (v < 0)
          return 0;
        return v;
      }
      function toRgbaString(base2) {
        const [r, g, b] = base2;
        if (3 in base2) {
          return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${roundAlpha(base2[3])})`;
        }
        return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, 1)`;
      }
      function createId(length = 8) {
        return Math.random().toString(16).slice(2, 2 + length);
      }
      function getSlot$1(instance, slotName = "default", fallback = []) {
        const slots = instance.$slots;
        const slot = slots[slotName];
        if (slot === void 0)
          return fallback;
        return slot();
      }
      function keep(object, keys = [], rest) {
        const keepedObject = {};
        keys.forEach((key) => {
          keepedObject[key] = object[key];
        });
        return Object.assign(keepedObject, rest);
      }
      function omit(object, keys = [], rest) {
        const omitedObject = {};
        const originalKeys = Object.getOwnPropertyNames(object);
        originalKeys.forEach((originalKey) => {
          if (!keys.includes(originalKey)) {
            omitedObject[originalKey] = object[originalKey];
          }
        });
        return Object.assign(omitedObject, rest);
      }
      function flatten(vNodes, filterCommentNode = true, result = []) {
        vNodes.forEach((vNode) => {
          if (vNode === null)
            return;
          if (typeof vNode !== "object") {
            if (typeof vNode === "string" || typeof vNode === "number") {
              result.push(vue.createTextVNode(String(vNode)));
            }
            return;
          }
          if (Array.isArray(vNode)) {
            flatten(vNode, filterCommentNode, result);
            return;
          }
          if (vNode.type === vue.Fragment) {
            if (vNode.children === null)
              return;
            if (Array.isArray(vNode.children)) {
              flatten(vNode.children, filterCommentNode, result);
            }
          } else {
            if (vNode.type === vue.Comment && filterCommentNode)
              return;
            result.push(vNode);
          }
        });
        return result;
      }
      function call$1(funcs, ...args) {
        if (Array.isArray(funcs)) {
          funcs.forEach((func) => call$1(func, ...args));
        } else
          return funcs(...args);
      }
      function keysOf(obj) {
        return Object.keys(obj);
      }
      const render$1 = (r, ...args) => {
        if (typeof r === "function") {
          return r(...args);
        } else if (typeof r === "string") {
          return vue.createTextVNode(r);
        } else if (typeof r === "number") {
          return vue.createTextVNode(String(r));
        } else {
          return null;
        }
      };
      function warn$2(location, message) {
        console.error(`[naive/${location}]: ${message}`);
      }
      function throwError(location, message) {
        throw new Error(`[naive/${location}]: ${message}`);
      }
      function getFirstSlotVNode(slots, slotName = "default", props = void 0) {
        const slot = slots[slotName];
        if (!slot) {
          warn$2("getFirstSlotVNode", `slot[${slotName}] is empty`);
          return null;
        }
        const slotContent = flatten(slot(props));
        if (slotContent.length === 1) {
          return slotContent[0];
        } else {
          warn$2("getFirstSlotVNode", `slot[${slotName}] should have exactly one child`);
          return null;
        }
      }
      function createInjectionKey(key) {
        return key;
      }
      function ensureValidVNode(vnodes) {
        return vnodes.some((child) => {
          if (!vue.isVNode(child)) {
            return true;
          }
          if (child.type === vue.Comment) {
            return false;
          }
          if (child.type === vue.Fragment && !ensureValidVNode(child.children)) {
            return false;
          }
          return true;
        }) ? vnodes : null;
      }
      function resolveSlot(slot, fallback) {
        return slot && ensureValidVNode(slot()) || fallback();
      }
      function resolveSlotWithProps(slot, props, fallback) {
        return slot && ensureValidVNode(slot(props)) || fallback(props);
      }
      function resolveWrappedSlot(slot, wrapper) {
        const children = slot && ensureValidVNode(slot());
        return wrapper(children || null);
      }
      function resolveWrappedSlotWithProps(slot, props, wrapper) {
        const children = slot && ensureValidVNode(slot(props));
        return wrapper(children || null);
      }
      function isSlotEmpty(slot) {
        return !(slot && ensureValidVNode(slot()));
      }
      const Wrapper = vue.defineComponent({
        render() {
          var _a, _b;
          return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);
        }
      });
      function color2Class(color) {
        return color.replace(/#|\(|\)|,|\s|\./g, "_");
      }
      function ampCount(selector) {
        let cnt = 0;
        for (let i = 0; i < selector.length; ++i) {
          if (selector[i] === "&")
            ++cnt;
        }
        return cnt;
      }
      const separatorRegex = /\s*,(?![^(]*\))\s*/g;
      const extraSpaceRegex = /\s+/g;
      function resolveSelectorWithAmp(amp, selector) {
        const nextAmp = [];
        selector.split(separatorRegex).forEach((partialSelector) => {
          let round = ampCount(partialSelector);
          if (!round) {
            amp.forEach((partialAmp) => {
              nextAmp.push(
                // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
                (partialAmp && partialAmp + " ") + partialSelector
              );
            });
            return;
          } else if (round === 1) {
            amp.forEach((partialAmp) => {
              nextAmp.push(partialSelector.replace("&", partialAmp));
            });
            return;
          }
          let partialNextAmp = [
            partialSelector
          ];
          while (round--) {
            const nextPartialNextAmp = [];
            partialNextAmp.forEach((selectorItr) => {
              amp.forEach((partialAmp) => {
                nextPartialNextAmp.push(selectorItr.replace("&", partialAmp));
              });
            });
            partialNextAmp = nextPartialNextAmp;
          }
          partialNextAmp.forEach((part) => nextAmp.push(part));
        });
        return nextAmp;
      }
      function resolveSelector(amp, selector) {
        const nextAmp = [];
        selector.split(separatorRegex).forEach((partialSelector) => {
          amp.forEach((partialAmp) => {
            nextAmp.push((partialAmp && partialAmp + " ") + partialSelector);
          });
        });
        return nextAmp;
      }
      function parseSelectorPath(selectorPaths) {
        let amp = [""];
        selectorPaths.forEach((selector) => {
          selector = selector && selector.trim();
          if (
            // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
            !selector
          ) {
            return;
          }
          if (selector.includes("&")) {
            amp = resolveSelectorWithAmp(amp, selector);
          } else {
            amp = resolveSelector(amp, selector);
          }
        });
        return amp.join(", ").replace(extraSpaceRegex, " ");
      }
      function removeElement(el) {
        if (!el)
          return;
        const parentElement = el.parentElement;
        if (parentElement)
          parentElement.removeChild(el);
      }
      function queryElement(id) {
        return document.querySelector(`style[cssr-id="${id}"]`);
      }
      function createElement(id) {
        const el = document.createElement("style");
        el.setAttribute("cssr-id", id);
        return el;
      }
      function isMediaOrSupports(selector) {
        if (!selector)
          return false;
        return /^\s*@(s|m)/.test(selector);
      }
      const kebabRegex = /[A-Z]/g;
      function kebabCase(pattern) {
        return pattern.replace(kebabRegex, (match) => "-" + match.toLowerCase());
      }
      function unwrapProperty(prop, indent = "  ") {
        if (typeof prop === "object" && prop !== null) {
          return " {\n" + Object.entries(prop).map((v) => {
            return indent + `  ${kebabCase(v[0])}: ${v[1]};`;
          }).join("\n") + "\n" + indent + "}";
        }
        return `: ${prop};`;
      }
      function unwrapProperties(props, instance, params) {
        if (typeof props === "function") {
          return props({
            context: instance.context,
            props: params
          });
        }
        return props;
      }
      function createStyle(selector, props, instance, params) {
        if (!props)
          return "";
        const unwrappedProps = unwrapProperties(props, instance, params);
        if (!unwrappedProps)
          return "";
        if (typeof unwrappedProps === "string") {
          return `${selector} {
${unwrappedProps}
}`;
        }
        const propertyNames = Object.keys(unwrappedProps);
        if (propertyNames.length === 0) {
          if (instance.config.keepEmptyBlock)
            return selector + " {\n}";
          return "";
        }
        const statements = selector ? [
          selector + " {"
        ] : [];
        propertyNames.forEach((propertyName) => {
          const property = unwrappedProps[propertyName];
          if (propertyName === "raw") {
            statements.push("\n" + property + "\n");
            return;
          }
          propertyName = kebabCase(propertyName);
          if (property !== null && property !== void 0) {
            statements.push(`  ${propertyName}${unwrapProperty(property)}`);
          }
        });
        if (selector) {
          statements.push("}");
        }
        return statements.join("\n");
      }
      function loopCNodeListWithCallback(children, options, callback) {
        if (!children)
          return;
        children.forEach((child) => {
          if (Array.isArray(child)) {
            loopCNodeListWithCallback(child, options, callback);
          } else if (typeof child === "function") {
            const grandChildren = child(options);
            if (Array.isArray(grandChildren)) {
              loopCNodeListWithCallback(grandChildren, options, callback);
            } else if (grandChildren) {
              callback(grandChildren);
            }
          } else if (child) {
            callback(child);
          }
        });
      }
      function traverseCNode(node, selectorPaths, styles, instance, params, styleSheet) {
        const $2 = node.$;
        let blockSelector = "";
        if (!$2 || typeof $2 === "string") {
          if (isMediaOrSupports($2)) {
            blockSelector = $2;
          } else {
            selectorPaths.push($2);
          }
        } else if (typeof $2 === "function") {
          const selector2 = $2({
            context: instance.context,
            props: params
          });
          if (isMediaOrSupports(selector2)) {
            blockSelector = selector2;
          } else {
            selectorPaths.push(selector2);
          }
        } else {
          if ($2.before)
            $2.before(instance.context);
          if (!$2.$ || typeof $2.$ === "string") {
            if (isMediaOrSupports($2.$)) {
              blockSelector = $2.$;
            } else {
              selectorPaths.push($2.$);
            }
          } else if ($2.$) {
            const selector2 = $2.$({
              context: instance.context,
              props: params
            });
            if (isMediaOrSupports(selector2)) {
              blockSelector = selector2;
            } else {
              selectorPaths.push(selector2);
            }
          }
        }
        const selector = parseSelectorPath(selectorPaths);
        const style2 = createStyle(selector, node.props, instance, params);
        if (blockSelector) {
          styles.push(`${blockSelector} {`);
          if (styleSheet && style2) {
            styleSheet.insertRule(`${blockSelector} {
${style2}
}
`);
          }
        } else {
          if (styleSheet && style2) {
            styleSheet.insertRule(style2);
          }
          if (!styleSheet && style2.length)
            styles.push(style2);
        }
        if (node.children) {
          loopCNodeListWithCallback(node.children, {
            context: instance.context,
            props: params
          }, (childNode) => {
            if (typeof childNode === "string") {
              const style3 = createStyle(selector, { raw: childNode }, instance, params);
              if (styleSheet) {
                styleSheet.insertRule(style3);
              } else {
                styles.push(style3);
              }
            } else {
              traverseCNode(childNode, selectorPaths, styles, instance, params, styleSheet);
            }
          });
        }
        selectorPaths.pop();
        if (blockSelector) {
          styles.push("}");
        }
        if ($2 && $2.after)
          $2.after(instance.context);
      }
      function render(node, instance, props, insertRule = false) {
        const styles = [];
        traverseCNode(node, [], styles, instance, props, insertRule ? node.instance.__styleSheet : void 0);
        if (insertRule)
          return "";
        return styles.join("\n\n");
      }
      function murmur2(str) {
        var h2 = 0;
        var k, i = 0, len = str.length;
        for (; len >= 4; ++i, len -= 4) {
          k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
          k = /* Math.imul(k, m): */
          (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
          k ^= /* k >>> r: */
          k >>> 24;
          h2 = /* Math.imul(k, m): */
          (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
          (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
        }
        switch (len) {
          case 3:
            h2 ^= (str.charCodeAt(i + 2) & 255) << 16;
          case 2:
            h2 ^= (str.charCodeAt(i + 1) & 255) << 8;
          case 1:
            h2 ^= str.charCodeAt(i) & 255;
            h2 = /* Math.imul(h, m): */
            (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
        }
        h2 ^= h2 >>> 13;
        h2 = /* Math.imul(h, m): */
        (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
        return ((h2 ^ h2 >>> 15) >>> 0).toString(36);
      }
      if (typeof window !== "undefined") {
        window.__cssrContext = {};
      }
      function unmount(intance, node, id) {
        const { els } = node;
        if (id === void 0) {
          els.forEach(removeElement);
          node.els = [];
        } else {
          const target = queryElement(id);
          if (target && els.includes(target)) {
            removeElement(target);
            node.els = els.filter((el) => el !== target);
          }
        }
      }
      function addElementToList(els, target) {
        els.push(target);
      }
      function mount(instance, node, id, props, head, silent, force, anchorMetaName, ssrAdapter2) {
        if (silent && !ssrAdapter2) {
          if (id === void 0) {
            console.error("[css-render/mount]: `id` is required in `silent` mode.");
            return;
          }
          const cssrContext = window.__cssrContext;
          if (!cssrContext[id]) {
            cssrContext[id] = true;
            render(node, instance, props, silent);
          }
          return;
        }
        let style2;
        if (id === void 0) {
          style2 = node.render(props);
          id = murmur2(style2);
        }
        if (ssrAdapter2) {
          ssrAdapter2.adapter(id, style2 !== null && style2 !== void 0 ? style2 : node.render(props));
          return;
        }
        const queriedTarget = queryElement(id);
        if (queriedTarget !== null && !force) {
          return queriedTarget;
        }
        const target = queriedTarget !== null && queriedTarget !== void 0 ? queriedTarget : createElement(id);
        if (style2 === void 0)
          style2 = node.render(props);
        target.textContent = style2;
        if (queriedTarget !== null)
          return queriedTarget;
        if (anchorMetaName) {
          const anchorMetaEl = document.head.querySelector(`meta[name="${anchorMetaName}"]`);
          if (anchorMetaEl) {
            document.head.insertBefore(target, anchorMetaEl);
            addElementToList(node.els, target);
            return target;
          }
        }
        if (head) {
          document.head.insertBefore(target, document.head.querySelector("style, link"));
        } else {
          document.head.appendChild(target);
        }
        addElementToList(node.els, target);
        return target;
      }
      function wrappedRender(props) {
        return render(this, this.instance, props);
      }
      function wrappedMount(options = {}) {
        const { id, ssr, props, head = false, silent = false, force = false, anchorMetaName } = options;
        const targetElement = mount(this.instance, this, id, props, head, silent, force, anchorMetaName, ssr);
        return targetElement;
      }
      function wrappedUnmount(options = {}) {
        const { id } = options;
        unmount(this.instance, this, id);
      }
      const createCNode = function(instance, $2, props, children) {
        return {
          instance,
          $: $2,
          props,
          children,
          els: [],
          render: wrappedRender,
          mount: wrappedMount,
          unmount: wrappedUnmount
        };
      };
      const c$1 = function(instance, $2, props, children) {
        if (Array.isArray($2)) {
          return createCNode(instance, { $: null }, null, $2);
        } else if (Array.isArray(props)) {
          return createCNode(instance, $2, null, props);
        } else if (Array.isArray(children)) {
          return createCNode(instance, $2, props, children);
        } else {
          return createCNode(instance, $2, props, null);
        }
      };
      function CssRender(config = {}) {
        let styleSheet = null;
        const cssr2 = {
          c: (...args) => c$1(cssr2, ...args),
          use: (plugin2, ...args) => plugin2.install(cssr2, ...args),
          find: queryElement,
          context: {},
          config,
          get __styleSheet() {
            if (!styleSheet) {
              const style2 = document.createElement("style");
              document.head.appendChild(style2);
              styleSheet = document.styleSheets[document.styleSheets.length - 1];
              return styleSheet;
            }
            return styleSheet;
          }
        };
        return cssr2;
      }
      function exists(id, ssr) {
        if (id === void 0)
          return false;
        if (ssr) {
          const { context: { ids } } = ssr;
          return ids.has(id);
        }
        return queryElement(id) !== null;
      }
      function plugin$1(options) {
        let _bPrefix = ".";
        let _ePrefix = "__";
        let _mPrefix = "--";
        let c2;
        if (options) {
          let t = options.blockPrefix;
          if (t) {
            _bPrefix = t;
          }
          t = options.elementPrefix;
          if (t) {
            _ePrefix = t;
          }
          t = options.modifierPrefix;
          if (t) {
            _mPrefix = t;
          }
        }
        const _plugin = {
          install(instance) {
            c2 = instance.c;
            const ctx2 = instance.context;
            ctx2.bem = {};
            ctx2.bem.b = null;
            ctx2.bem.els = null;
          }
        };
        function b(arg) {
          let memorizedB;
          let memorizedE;
          return {
            before(ctx2) {
              memorizedB = ctx2.bem.b;
              memorizedE = ctx2.bem.els;
              ctx2.bem.els = null;
            },
            after(ctx2) {
              ctx2.bem.b = memorizedB;
              ctx2.bem.els = memorizedE;
            },
            $({ context, props }) {
              arg = typeof arg === "string" ? arg : arg({ context, props });
              context.bem.b = arg;
              return `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}`;
            }
          };
        }
        function e(arg) {
          let memorizedE;
          return {
            before(ctx2) {
              memorizedE = ctx2.bem.els;
            },
            after(ctx2) {
              ctx2.bem.els = memorizedE;
            },
            $({ context, props }) {
              arg = typeof arg === "string" ? arg : arg({ context, props });
              context.bem.els = arg.split(",").map((v) => v.trim());
              return context.bem.els.map((el) => `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${_ePrefix}${el}`).join(", ");
            }
          };
        }
        function m(arg) {
          return {
            $({ context, props }) {
              arg = typeof arg === "string" ? arg : arg({ context, props });
              const modifiers = arg.split(",").map((v) => v.trim());
              function elementToSelector(el) {
                return modifiers.map((modifier) => `&${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${el !== void 0 ? `${_ePrefix}${el}` : ""}${_mPrefix}${modifier}`).join(", ");
              }
              const els = context.bem.els;
              if (els !== null) {
                return elementToSelector(els[0]);
              } else {
                return elementToSelector();
              }
            }
          };
        }
        function notM(arg) {
          return {
            $({ context, props }) {
              arg = typeof arg === "string" ? arg : arg({ context, props });
              const els = context.bem.els;
              return `&:not(${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${els !== null && els.length > 0 ? `${_ePrefix}${els[0]}` : ""}${_mPrefix}${arg})`;
            }
          };
        }
        const cB2 = (...args) => c2(b(args[0]), args[1], args[2]);
        const cE2 = (...args) => c2(e(args[0]), args[1], args[2]);
        const cM2 = (...args) => c2(m(args[0]), args[1], args[2]);
        const cNotM2 = (...args) => c2(notM(args[0]), args[1], args[2]);
        Object.assign(_plugin, {
          cB: cB2,
          cE: cE2,
          cM: cM2,
          cNotM: cNotM2
        });
        return _plugin;
      }
      const namespace = "n";
      const prefix = `.${namespace}-`;
      const elementPrefix = "__";
      const modifierPrefix = "--";
      const cssr = CssRender();
      const plugin = plugin$1({
        blockPrefix: prefix,
        elementPrefix,
        modifierPrefix
      });
      cssr.use(plugin);
      const {
        c,
        find
      } = cssr;
      const {
        cB,
        cE,
        cM,
        cNotM
      } = plugin;
      function insideModal(style2) {
        return c(({
          props: {
            bPrefix
          }
        }) => `${bPrefix || prefix}modal, ${bPrefix || prefix}drawer`, [style2]);
      }
      function insidePopover(style2) {
        return c(({
          props: {
            bPrefix
          }
        }) => `${bPrefix || prefix}popover`, [style2]);
      }
      function asModal(style2) {
        return c(({
          props: {
            bPrefix
          }
        }) => `&${bPrefix || prefix}modal`, style2);
      }
      function createKey(prefix2, suffix2) {
        return prefix2 + (suffix2 === "default" ? "" : suffix2.replace(/^[a-z]/, (startChar) => startChar.toUpperCase()));
      }
      const isBrowser$2 = typeof document !== "undefined" && typeof window !== "undefined";
      const eventSet = /* @__PURE__ */ new WeakSet();
      function eventEffectNotPerformed(event) {
        return !eventSet.has(event);
      }
      function useFalseUntilTruthy(originalRef) {
        const currentRef = vue.ref(!!originalRef.value);
        if (currentRef.value)
          return vue.readonly(currentRef);
        const stop = vue.watch(originalRef, (value) => {
          if (value) {
            currentRef.value = true;
            stop();
          }
        });
        return vue.readonly(currentRef);
      }
      function useMemo(getterOrOptions) {
        const computedValueRef = vue.computed(getterOrOptions);
        const valueRef = vue.ref(computedValueRef.value);
        vue.watch(computedValueRef, (value) => {
          valueRef.value = value;
        });
        if (typeof getterOrOptions === "function") {
          return valueRef;
        } else {
          return {
            __v_isRef: true,
            get value() {
              return valueRef.value;
            },
            set value(v) {
              getterOrOptions.set(v);
            }
          };
        }
      }
      function hasInstance() {
        return vue.getCurrentInstance() !== null;
      }
      const isBrowser$1 = typeof window !== "undefined";
      function getEventTarget(e) {
        const path = e.composedPath();
        return path[0];
      }
      const traps = {
        mousemoveoutside: /* @__PURE__ */ new WeakMap(),
        clickoutside: /* @__PURE__ */ new WeakMap()
      };
      function createTrapHandler(name, el, originalHandler) {
        if (name === "mousemoveoutside") {
          const moveHandler = (e) => {
            if (el.contains(getEventTarget(e)))
              return;
            originalHandler(e);
          };
          return {
            mousemove: moveHandler,
            touchstart: moveHandler
          };
        } else if (name === "clickoutside") {
          let mouseDownOutside = false;
          const downHandler = (e) => {
            mouseDownOutside = !el.contains(getEventTarget(e));
          };
          const upHanlder = (e) => {
            if (!mouseDownOutside)
              return;
            if (el.contains(getEventTarget(e)))
              return;
            originalHandler(e);
          };
          return {
            mousedown: downHandler,
            mouseup: upHanlder,
            touchstart: downHandler,
            touchend: upHanlder
          };
        }
        console.error(
          // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
          `[evtd/create-trap-handler]: name \`${name}\` is invalid. This could be a bug of evtd.`
        );
        return {};
      }
      function ensureTrapHandlers(name, el, handler) {
        const handlers = traps[name];
        let elHandlers = handlers.get(el);
        if (elHandlers === void 0) {
          handlers.set(el, elHandlers = /* @__PURE__ */ new WeakMap());
        }
        let trapHandler = elHandlers.get(handler);
        if (trapHandler === void 0) {
          elHandlers.set(handler, trapHandler = createTrapHandler(name, el, handler));
        }
        return trapHandler;
      }
      function trapOn(name, el, handler, options) {
        if (name === "mousemoveoutside" || name === "clickoutside") {
          const trapHandlers = ensureTrapHandlers(name, el, handler);
          Object.keys(trapHandlers).forEach((key) => {
            on(key, document, trapHandlers[key], options);
          });
          return true;
        }
        return false;
      }
      function trapOff(name, el, handler, options) {
        if (name === "mousemoveoutside" || name === "clickoutside") {
          const trapHandlers = ensureTrapHandlers(name, el, handler);
          Object.keys(trapHandlers).forEach((key) => {
            off(key, document, trapHandlers[key], options);
          });
          return true;
        }
        return false;
      }
      function createDelegate() {
        if (typeof window === "undefined") {
          return {
            on: () => {
            },
            off: () => {
            }
          };
        }
        const propagationStopped = /* @__PURE__ */ new WeakMap();
        const immediatePropagationStopped = /* @__PURE__ */ new WeakMap();
        function trackPropagation() {
          propagationStopped.set(this, true);
        }
        function trackImmediate() {
          propagationStopped.set(this, true);
          immediatePropagationStopped.set(this, true);
        }
        function spy(event, propName, fn) {
          const source = event[propName];
          event[propName] = function() {
            fn.apply(event, arguments);
            return source.apply(event, arguments);
          };
          return event;
        }
        function unspy(event, propName) {
          event[propName] = Event.prototype[propName];
        }
        const currentTargets = /* @__PURE__ */ new WeakMap();
        const currentTargetDescriptor = Object.getOwnPropertyDescriptor(Event.prototype, "currentTarget");
        function getCurrentTarget() {
          var _a;
          return (_a = currentTargets.get(this)) !== null && _a !== void 0 ? _a : null;
        }
        function defineCurrentTarget(event, getter) {
          if (currentTargetDescriptor === void 0)
            return;
          Object.defineProperty(event, "currentTarget", {
            configurable: true,
            enumerable: true,
            get: getter !== null && getter !== void 0 ? getter : currentTargetDescriptor.get
          });
        }
        const phaseToTypeToElToHandlers = {
          bubble: {},
          capture: {}
        };
        const typeToWindowEventHandlers = {};
        function createUnifiedHandler() {
          const delegeteHandler = function(e) {
            const { type, eventPhase, bubbles } = e;
            const target = getEventTarget(e);
            if (eventPhase === 2)
              return;
            const phase = eventPhase === 1 ? "capture" : "bubble";
            let cursor = target;
            const path = [];
            while (true) {
              if (cursor === null)
                cursor = window;
              path.push(cursor);
              if (cursor === window) {
                break;
              }
              cursor = cursor.parentNode || null;
            }
            const captureElToHandlers = phaseToTypeToElToHandlers.capture[type];
            const bubbleElToHandlers = phaseToTypeToElToHandlers.bubble[type];
            spy(e, "stopPropagation", trackPropagation);
            spy(e, "stopImmediatePropagation", trackImmediate);
            defineCurrentTarget(e, getCurrentTarget);
            if (phase === "capture") {
              if (captureElToHandlers === void 0)
                return;
              for (let i = path.length - 1; i >= 0; --i) {
                if (propagationStopped.has(e))
                  break;
                const target2 = path[i];
                const handlers = captureElToHandlers.get(target2);
                if (handlers !== void 0) {
                  currentTargets.set(e, target2);
                  for (const handler of handlers) {
                    if (immediatePropagationStopped.has(e))
                      break;
                    handler(e);
                  }
                }
                if (i === 0 && !bubbles && bubbleElToHandlers !== void 0) {
                  const bubbleHandlers = bubbleElToHandlers.get(target2);
                  if (bubbleHandlers !== void 0) {
                    for (const handler of bubbleHandlers) {
                      if (immediatePropagationStopped.has(e))
                        break;
                      handler(e);
                    }
                  }
                }
              }
            } else if (phase === "bubble") {
              if (bubbleElToHandlers === void 0)
                return;
              for (let i = 0; i < path.length; ++i) {
                if (propagationStopped.has(e))
                  break;
                const target2 = path[i];
                const handlers = bubbleElToHandlers.get(target2);
                if (handlers !== void 0) {
                  currentTargets.set(e, target2);
                  for (const handler of handlers) {
                    if (immediatePropagationStopped.has(e))
                      break;
                    handler(e);
                  }
                }
              }
            }
            unspy(e, "stopPropagation");
            unspy(e, "stopImmediatePropagation");
            defineCurrentTarget(e);
          };
          delegeteHandler.displayName = "evtdUnifiedHandler";
          return delegeteHandler;
        }
        function createUnifiedWindowEventHandler() {
          const delegateHandler = function(e) {
            const { type, eventPhase } = e;
            if (eventPhase !== 2)
              return;
            const handlers = typeToWindowEventHandlers[type];
            if (handlers === void 0)
              return;
            handlers.forEach((handler) => handler(e));
          };
          delegateHandler.displayName = "evtdUnifiedWindowEventHandler";
          return delegateHandler;
        }
        const unifiedHandler = createUnifiedHandler();
        const unfiendWindowEventHandler = createUnifiedWindowEventHandler();
        function ensureElToHandlers(phase, type) {
          const phaseHandlers = phaseToTypeToElToHandlers[phase];
          if (phaseHandlers[type] === void 0) {
            phaseHandlers[type] = /* @__PURE__ */ new Map();
            window.addEventListener(type, unifiedHandler, phase === "capture");
          }
          return phaseHandlers[type];
        }
        function ensureWindowEventHandlers(type) {
          const windowEventHandlers = typeToWindowEventHandlers[type];
          if (windowEventHandlers === void 0) {
            typeToWindowEventHandlers[type] = /* @__PURE__ */ new Set();
            window.addEventListener(type, unfiendWindowEventHandler);
          }
          return typeToWindowEventHandlers[type];
        }
        function ensureHandlers(elToHandlers, el) {
          let elHandlers = elToHandlers.get(el);
          if (elHandlers === void 0) {
            elToHandlers.set(el, elHandlers = /* @__PURE__ */ new Set());
          }
          return elHandlers;
        }
        function handlerExist(el, phase, type, handler) {
          const elToHandlers = phaseToTypeToElToHandlers[phase][type];
          if (elToHandlers !== void 0) {
            const handlers = elToHandlers.get(el);
            if (handlers !== void 0) {
              if (handlers.has(handler))
                return true;
            }
          }
          return false;
        }
        function windowEventHandlerExist(type, handler) {
          const handlers = typeToWindowEventHandlers[type];
          if (handlers !== void 0) {
            if (handlers.has(handler)) {
              return true;
            }
          }
          return false;
        }
        function on2(type, el, handler, options) {
          let mergedHandler;
          if (typeof options === "object" && options.once === true) {
            mergedHandler = (e) => {
              off2(type, el, mergedHandler, options);
              handler(e);
            };
          } else {
            mergedHandler = handler;
          }
          const trapped = trapOn(type, el, mergedHandler, options);
          if (trapped)
            return;
          const phase = options === true || typeof options === "object" && options.capture === true ? "capture" : "bubble";
          const elToHandlers = ensureElToHandlers(phase, type);
          const handlers = ensureHandlers(elToHandlers, el);
          if (!handlers.has(mergedHandler))
            handlers.add(mergedHandler);
          if (el === window) {
            const windowEventHandlers = ensureWindowEventHandlers(type);
            if (!windowEventHandlers.has(mergedHandler)) {
              windowEventHandlers.add(mergedHandler);
            }
          }
        }
        function off2(type, el, handler, options) {
          const trapped = trapOff(type, el, handler, options);
          if (trapped)
            return;
          const capture = options === true || typeof options === "object" && options.capture === true;
          const phase = capture ? "capture" : "bubble";
          const elToHandlers = ensureElToHandlers(phase, type);
          const handlers = ensureHandlers(elToHandlers, el);
          if (el === window) {
            const mirrorPhase = capture ? "bubble" : "capture";
            if (!handlerExist(el, mirrorPhase, type, handler) && windowEventHandlerExist(type, handler)) {
              const windowEventHandlers = typeToWindowEventHandlers[type];
              windowEventHandlers.delete(handler);
              if (windowEventHandlers.size === 0) {
                window.removeEventListener(type, unfiendWindowEventHandler);
                typeToWindowEventHandlers[type] = void 0;
              }
            }
          }
          if (handlers.has(handler))
            handlers.delete(handler);
          if (handlers.size === 0) {
            elToHandlers.delete(el);
          }
          if (elToHandlers.size === 0) {
            window.removeEventListener(type, unifiedHandler, phase === "capture");
            phaseToTypeToElToHandlers[phase][type] = void 0;
          }
        }
        return {
          on: on2,
          off: off2
        };
      }
      const { on, off } = createDelegate();
      const mousePositionRef = vue.ref(null);
      function clickHandler(e) {
        if (e.clientX > 0 || e.clientY > 0) {
          mousePositionRef.value = {
            x: e.clientX,
            y: e.clientY
          };
        } else {
          const { target } = e;
          if (target instanceof Element) {
            const { left, top, width, height } = target.getBoundingClientRect();
            if (left > 0 || top > 0) {
              mousePositionRef.value = {
                x: left + width / 2,
                y: top + height / 2
              };
            } else {
              mousePositionRef.value = { x: 0, y: 0 };
            }
          } else {
            mousePositionRef.value = null;
          }
        }
      }
      let usedCount$1 = 0;
      let managable$1 = true;
      function useClickPosition() {
        if (!isBrowser$1)
          return vue.readonly(vue.ref(null));
        if (usedCount$1 === 0)
          on("click", document, clickHandler, true);
        const setup = () => {
          usedCount$1 += 1;
        };
        if (managable$1 && (managable$1 = hasInstance())) {
          vue.onBeforeMount(setup);
          vue.onBeforeUnmount(() => {
            usedCount$1 -= 1;
            if (usedCount$1 === 0)
              off("click", document, clickHandler, true);
          });
        } else {
          setup();
        }
        return vue.readonly(mousePositionRef);
      }
      const clickedTimeRef = vue.ref(void 0);
      let usedCount = 0;
      function handleClick() {
        clickedTimeRef.value = Date.now();
      }
      let managable = true;
      function useClicked(timeout) {
        if (!isBrowser$1)
          return vue.readonly(vue.ref(false));
        const clickedRef = vue.ref(false);
        let timerId = null;
        function clearTimer() {
          if (timerId !== null)
            window.clearTimeout(timerId);
        }
        function clickedHandler() {
          clearTimer();
          clickedRef.value = true;
          timerId = window.setTimeout(() => {
            clickedRef.value = false;
          }, timeout);
        }
        if (usedCount === 0) {
          on("click", window, handleClick, true);
        }
        const setup = () => {
          usedCount += 1;
          on("click", window, clickedHandler, true);
        };
        if (managable && (managable = hasInstance())) {
          vue.onBeforeMount(setup);
          vue.onBeforeUnmount(() => {
            usedCount -= 1;
            if (usedCount === 0) {
              off("click", window, handleClick, true);
            }
            off("click", window, clickedHandler, true);
            clearTimer();
          });
        } else {
          setup();
        }
        return vue.readonly(clickedRef);
      }
      function useMergedState(controlledStateRef, uncontrolledStateRef) {
        vue.watch(controlledStateRef, (value) => {
          if (value !== void 0) {
            uncontrolledStateRef.value = value;
          }
        });
        return vue.computed(() => {
          if (controlledStateRef.value === void 0) {
            return uncontrolledStateRef.value;
          }
          return controlledStateRef.value;
        });
      }
      function isMounted() {
        const isMounted2 = vue.ref(false);
        vue.onMounted(() => {
          isMounted2.value = true;
        });
        return vue.readonly(isMounted2);
      }
      function useCompitable(reactive2, keys) {
        return vue.computed(() => {
          for (const key of keys) {
            if (reactive2[key] !== void 0)
              return reactive2[key];
          }
          return reactive2[keys[keys.length - 1]];
        });
      }
      const isIos = (typeof window === "undefined" ? false : /iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
      !window.MSStream;
      function useIsIos() {
        return isIos;
      }
      const modalBodyInjectionKey = createInjectionKey("n-modal-body");
      const modalInjectionKey = createInjectionKey("n-modal");
      const drawerBodyInjectionKey = createInjectionKey("n-drawer-body");
      const popoverBodyInjectionKey = createInjectionKey("n-popover-body");
      function getSlot(scope, slots, slotName = "default") {
        const slot = slots[slotName];
        if (slot === void 0) {
          throw new Error(`[vueuc/${scope}]: slot[${slotName}] is empty.`);
        }
        return slot();
      }
      const ctxKey = "@@coContext";
      const clickoutside = {
        mounted(el, { value, modifiers }) {
          el[ctxKey] = {
            handler: void 0
          };
          if (typeof value === "function") {
            el[ctxKey].handler = value;
            on("clickoutside", el, value, {
              capture: modifiers.capture
            });
          }
        },
        updated(el, { value, modifiers }) {
          const ctx2 = el[ctxKey];
          if (typeof value === "function") {
            if (ctx2.handler) {
              if (ctx2.handler !== value) {
                off("clickoutside", el, ctx2.handler, {
                  capture: modifiers.capture
                });
                ctx2.handler = value;
                on("clickoutside", el, value, {
                  capture: modifiers.capture
                });
              }
            } else {
              el[ctxKey].handler = value;
              on("clickoutside", el, value, {
                capture: modifiers.capture
              });
            }
          } else {
            if (ctx2.handler) {
              off("clickoutside", el, ctx2.handler, {
                capture: modifiers.capture
              });
              ctx2.handler = void 0;
            }
          }
        },
        unmounted(el, { modifiers }) {
          const { handler } = el[ctxKey];
          if (handler) {
            off("clickoutside", el, handler, {
              capture: modifiers.capture
            });
          }
          el[ctxKey].handler = void 0;
        }
      };
      const clickoutside$1 = clickoutside;
      function warn$1(location, message) {
        console.error(`[vdirs/${location}]: ${message}`);
      }
      class ZIndexManager {
        constructor() {
          this.elementZIndex = /* @__PURE__ */ new Map();
          this.nextZIndex = 2e3;
        }
        get elementCount() {
          return this.elementZIndex.size;
        }
        ensureZIndex(el, zIndex) {
          const { elementZIndex } = this;
          if (zIndex !== void 0) {
            el.style.zIndex = `${zIndex}`;
            elementZIndex.delete(el);
            return;
          }
          const { nextZIndex } = this;
          if (elementZIndex.has(el)) {
            const currentZIndex = elementZIndex.get(el);
            if (currentZIndex + 1 === this.nextZIndex)
              return;
          }
          el.style.zIndex = `${nextZIndex}`;
          elementZIndex.set(el, nextZIndex);
          this.nextZIndex = nextZIndex + 1;
          this.squashState();
        }
        unregister(el, zIndex) {
          const { elementZIndex } = this;
          if (elementZIndex.has(el)) {
            elementZIndex.delete(el);
          } else if (zIndex === void 0) {
            warn$1("z-index-manager/unregister-element", "Element not found when unregistering.");
          }
          this.squashState();
        }
        squashState() {
          const { elementCount } = this;
          if (!elementCount) {
            this.nextZIndex = 2e3;
          }
          if (this.nextZIndex - elementCount > 2500)
            this.rearrange();
        }
        rearrange() {
          const elementZIndexPair = Array.from(this.elementZIndex.entries());
          elementZIndexPair.sort((pair1, pair2) => {
            return pair1[1] - pair2[1];
          });
          this.nextZIndex = 2e3;
          elementZIndexPair.forEach((pair) => {
            const el = pair[0];
            const zIndex = this.nextZIndex++;
            if (`${zIndex}` !== el.style.zIndex)
              el.style.zIndex = `${zIndex}`;
          });
        }
      }
      const zIndexManager = new ZIndexManager();
      const ctx = "@@ziContext";
      const zindexable = {
        mounted(el, bindings) {
          const { value = {} } = bindings;
          const { zIndex, enabled } = value;
          el[ctx] = {
            enabled: !!enabled,
            initialized: false
          };
          if (enabled) {
            zIndexManager.ensureZIndex(el, zIndex);
            el[ctx].initialized = true;
          }
        },
        updated(el, bindings) {
          const { value = {} } = bindings;
          const { zIndex, enabled } = value;
          const cachedEnabled = el[ctx].enabled;
          if (enabled && !cachedEnabled) {
            zIndexManager.ensureZIndex(el, zIndex);
            el[ctx].initialized = true;
          }
          el[ctx].enabled = !!enabled;
        },
        unmounted(el, bindings) {
          if (!el[ctx].initialized)
            return;
          const { value = {} } = bindings;
          const { zIndex } = value;
          zIndexManager.unregister(el, zIndex);
        }
      };
      const zindexable$1 = zindexable;
      const ssrContextKey = Symbol("@css-render/vue3-ssr");
      function createStyleString(id, style2) {
        return `<style cssr-id="${id}">
${style2}
</style>`;
      }
      function ssrAdapter(id, style2) {
        const ssrContext = vue.inject(ssrContextKey, null);
        if (ssrContext === null) {
          console.error("[css-render/vue3-ssr]: no ssr context found.");
          return;
        }
        const { styles, ids } = ssrContext;
        if (ids.has(id))
          return;
        if (styles !== null) {
          ids.add(id);
          styles.push(createStyleString(id, style2));
        }
      }
      const isBrowser = typeof document !== "undefined";
      function useSsrAdapter() {
        if (isBrowser)
          return void 0;
        const context = vue.inject(ssrContextKey, null);
        if (context === null)
          return void 0;
        return {
          adapter: ssrAdapter,
          context
        };
      }
      function warn(location, message) {
        console.error(`[vueuc/${location}]: ${message}`);
      }
      function resolveTo(selector) {
        if (typeof selector === "string") {
          return document.querySelector(selector);
        }
        return selector();
      }
      const LazyTeleport = vue.defineComponent({
        name: "LazyTeleport",
        props: {
          to: {
            type: [String, Object],
            default: void 0
          },
          disabled: Boolean,
          show: {
            type: Boolean,
            required: true
          }
        },
        setup(props) {
          return {
            showTeleport: useFalseUntilTruthy(vue.toRef(props, "show")),
            mergedTo: vue.computed(() => {
              const { to } = props;
              return to !== null && to !== void 0 ? to : "body";
            })
          };
        },
        render() {
          return this.showTeleport ? this.disabled ? getSlot("lazy-teleport", this.$slots) : vue.h(vue.Teleport, {
            disabled: this.disabled,
            to: this.mergedTo
          }, getSlot("lazy-teleport", this.$slots)) : null;
        }
      });
      var resizeObservers = [];
      var hasActiveObservations = function() {
        return resizeObservers.some(function(ro) {
          return ro.activeTargets.length > 0;
        });
      };
      var hasSkippedObservations = function() {
        return resizeObservers.some(function(ro) {
          return ro.skippedTargets.length > 0;
        });
      };
      var msg = "ResizeObserver loop completed with undelivered notifications.";
      var deliverResizeLoopError = function() {
        var event;
        if (typeof ErrorEvent === "function") {
          event = new ErrorEvent("error", {
            message: msg
          });
        } else {
          event = document.createEvent("Event");
          event.initEvent("error", false, false);
          event.message = msg;
        }
        window.dispatchEvent(event);
      };
      var ResizeObserverBoxOptions;
      (function(ResizeObserverBoxOptions2) {
        ResizeObserverBoxOptions2["BORDER_BOX"] = "border-box";
        ResizeObserverBoxOptions2["CONTENT_BOX"] = "content-box";
        ResizeObserverBoxOptions2["DEVICE_PIXEL_CONTENT_BOX"] = "device-pixel-content-box";
      })(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));
      var freeze = function(obj) {
        return Object.freeze(obj);
      };
      var ResizeObserverSize = function() {
        function ResizeObserverSize2(inlineSize, blockSize) {
          this.inlineSize = inlineSize;
          this.blockSize = blockSize;
          freeze(this);
        }
        return ResizeObserverSize2;
      }();
      var DOMRectReadOnly = function() {
        function DOMRectReadOnly2(x, y, width, height) {
          this.x = x;
          this.y = y;
          this.width = width;
          this.height = height;
          this.top = this.y;
          this.left = this.x;
          this.bottom = this.top + this.height;
          this.right = this.left + this.width;
          return freeze(this);
        }
        DOMRectReadOnly2.prototype.toJSON = function() {
          var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;
          return { x, y, top, right, bottom, left, width, height };
        };
        DOMRectReadOnly2.fromRect = function(rectangle) {
          return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
        };
        return DOMRectReadOnly2;
      }();
      var isSVG = function(target) {
        return target instanceof SVGElement && "getBBox" in target;
      };
      var isHidden = function(target) {
        if (isSVG(target)) {
          var _a = target.getBBox(), width = _a.width, height = _a.height;
          return !width && !height;
        }
        var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;
        return !(offsetWidth || offsetHeight || target.getClientRects().length);
      };
      var isElement$1 = function(obj) {
        var _a;
        if (obj instanceof Element) {
          return true;
        }
        var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
        return !!(scope && obj instanceof scope.Element);
      };
      var isReplacedElement = function(target) {
        switch (target.tagName) {
          case "INPUT":
            if (target.type !== "image") {
              break;
            }
          case "VIDEO":
          case "AUDIO":
          case "EMBED":
          case "OBJECT":
          case "CANVAS":
          case "IFRAME":
          case "IMG":
            return true;
        }
        return false;
      };
      var global$1 = typeof window !== "undefined" ? window : {};
      var cache = /* @__PURE__ */ new WeakMap();
      var scrollRegexp = /auto|scroll/;
      var verticalRegexp = /^tb|vertical/;
      var IE = /msie|trident/i.test(global$1.navigator && global$1.navigator.userAgent);
      var parseDimension = function(pixel) {
        return parseFloat(pixel || "0");
      };
      var size = function(inlineSize, blockSize, switchSizes) {
        if (inlineSize === void 0) {
          inlineSize = 0;
        }
        if (blockSize === void 0) {
          blockSize = 0;
        }
        if (switchSizes === void 0) {
          switchSizes = false;
        }
        return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);
      };
      var zeroBoxes = freeze({
        devicePixelContentBoxSize: size(),
        borderBoxSize: size(),
        contentBoxSize: size(),
        contentRect: new DOMRectReadOnly(0, 0, 0, 0)
      });
      var calculateBoxSizes = function(target, forceRecalculation) {
        if (forceRecalculation === void 0) {
          forceRecalculation = false;
        }
        if (cache.has(target) && !forceRecalculation) {
          return cache.get(target);
        }
        if (isHidden(target)) {
          cache.set(target, zeroBoxes);
          return zeroBoxes;
        }
        var cs = getComputedStyle(target);
        var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();
        var removePadding = !IE && cs.boxSizing === "border-box";
        var switchSizes = verticalRegexp.test(cs.writingMode || "");
        var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || "");
        var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || "");
        var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);
        var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);
        var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);
        var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);
        var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);
        var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);
        var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);
        var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);
        var horizontalPadding = paddingLeft + paddingRight;
        var verticalPadding = paddingTop + paddingBottom;
        var horizontalBorderArea = borderLeft + borderRight;
        var verticalBorderArea = borderTop + borderBottom;
        var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;
        var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;
        var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;
        var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;
        var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;
        var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;
        var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;
        var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;
        var boxes = freeze({
          devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),
          borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),
          contentBoxSize: size(contentWidth, contentHeight, switchSizes),
          contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)
        });
        cache.set(target, boxes);
        return boxes;
      };
      var calculateBoxSize = function(target, observedBox, forceRecalculation) {
        var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;
        switch (observedBox) {
          case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:
            return devicePixelContentBoxSize;
          case ResizeObserverBoxOptions.BORDER_BOX:
            return borderBoxSize;
          default:
            return contentBoxSize;
        }
      };
      var ResizeObserverEntry = function() {
        function ResizeObserverEntry2(target) {
          var boxes = calculateBoxSizes(target);
          this.target = target;
          this.contentRect = boxes.contentRect;
          this.borderBoxSize = freeze([boxes.borderBoxSize]);
          this.contentBoxSize = freeze([boxes.contentBoxSize]);
          this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);
        }
        return ResizeObserverEntry2;
      }();
      var calculateDepthForNode = function(node) {
        if (isHidden(node)) {
          return Infinity;
        }
        var depth = 0;
        var parent = node.parentNode;
        while (parent) {
          depth += 1;
          parent = parent.parentNode;
        }
        return depth;
      };
      var broadcastActiveObservations = function() {
        var shallowestDepth = Infinity;
        var callbacks2 = [];
        resizeObservers.forEach(function processObserver(ro) {
          if (ro.activeTargets.length === 0) {
            return;
          }
          var entries = [];
          ro.activeTargets.forEach(function processTarget(ot) {
            var entry = new ResizeObserverEntry(ot.target);
            var targetDepth = calculateDepthForNode(ot.target);
            entries.push(entry);
            ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);
            if (targetDepth < shallowestDepth) {
              shallowestDepth = targetDepth;
            }
          });
          callbacks2.push(function resizeObserverCallback() {
            ro.callback.call(ro.observer, entries, ro.observer);
          });
          ro.activeTargets.splice(0, ro.activeTargets.length);
        });
        for (var _i = 0, callbacks_1 = callbacks2; _i < callbacks_1.length; _i++) {
          var callback = callbacks_1[_i];
          callback();
        }
        return shallowestDepth;
      };
      var gatherActiveObservationsAtDepth = function(depth) {
        resizeObservers.forEach(function processObserver(ro) {
          ro.activeTargets.splice(0, ro.activeTargets.length);
          ro.skippedTargets.splice(0, ro.skippedTargets.length);
          ro.observationTargets.forEach(function processTarget(ot) {
            if (ot.isActive()) {
              if (calculateDepthForNode(ot.target) > depth) {
                ro.activeTargets.push(ot);
              } else {
                ro.skippedTargets.push(ot);
              }
            }
          });
        });
      };
      var process = function() {
        var depth = 0;
        gatherActiveObservationsAtDepth(depth);
        while (hasActiveObservations()) {
          depth = broadcastActiveObservations();
          gatherActiveObservationsAtDepth(depth);
        }
        if (hasSkippedObservations()) {
          deliverResizeLoopError();
        }
        return depth > 0;
      };
      var trigger;
      var callbacks = [];
      var notify = function() {
        return callbacks.splice(0).forEach(function(cb) {
          return cb();
        });
      };
      var queueMicroTask = function(callback) {
        if (!trigger) {
          var toggle_1 = 0;
          var el_1 = document.createTextNode("");
          var config = { characterData: true };
          new MutationObserver(function() {
            return notify();
          }).observe(el_1, config);
          trigger = function() {
            el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++);
          };
        }
        callbacks.push(callback);
        trigger();
      };
      var queueResizeObserver = function(cb) {
        queueMicroTask(function ResizeObserver2() {
          requestAnimationFrame(cb);
        });
      };
      var watching = 0;
      var isWatching = function() {
        return !!watching;
      };
      var CATCH_PERIOD = 250;
      var observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
      var events = [
        "resize",
        "load",
        "transitionend",
        "animationend",
        "animationstart",
        "animationiteration",
        "keyup",
        "keydown",
        "mouseup",
        "mousedown",
        "mouseover",
        "mouseout",
        "blur",
        "focus"
      ];
      var time = function(timeout) {
        if (timeout === void 0) {
          timeout = 0;
        }
        return Date.now() + timeout;
      };
      var scheduled = false;
      var Scheduler = function() {
        function Scheduler2() {
          var _this = this;
          this.stopped = true;
          this.listener = function() {
            return _this.schedule();
          };
        }
        Scheduler2.prototype.run = function(timeout) {
          var _this = this;
          if (timeout === void 0) {
            timeout = CATCH_PERIOD;
          }
          if (scheduled) {
            return;
          }
          scheduled = true;
          var until = time(timeout);
          queueResizeObserver(function() {
            var elementsHaveResized = false;
            try {
              elementsHaveResized = process();
            } finally {
              scheduled = false;
              timeout = until - time();
              if (!isWatching()) {
                return;
              }
              if (elementsHaveResized) {
                _this.run(1e3);
              } else if (timeout > 0) {
                _this.run(timeout);
              } else {
                _this.start();
              }
            }
          });
        };
        Scheduler2.prototype.schedule = function() {
          this.stop();
          this.run();
        };
        Scheduler2.prototype.observe = function() {
          var _this = this;
          var cb = function() {
            return _this.observer && _this.observer.observe(document.body, observerConfig);
          };
          document.body ? cb() : global$1.addEventListener("DOMContentLoaded", cb);
        };
        Scheduler2.prototype.start = function() {
          var _this = this;
          if (this.stopped) {
            this.stopped = false;
            this.observer = new MutationObserver(this.listener);
            this.observe();
            events.forEach(function(name) {
              return global$1.addEventListener(name, _this.listener, true);
            });
          }
        };
        Scheduler2.prototype.stop = function() {
          var _this = this;
          if (!this.stopped) {
            this.observer && this.observer.disconnect();
            events.forEach(function(name) {
              return global$1.removeEventListener(name, _this.listener, true);
            });
            this.stopped = true;
          }
        };
        return Scheduler2;
      }();
      var scheduler = new Scheduler();
      var updateCount = function(n) {
        !watching && n > 0 && scheduler.start();
        watching += n;
        !watching && scheduler.stop();
      };
      var skipNotifyOnElement = function(target) {
        return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === "inline";
      };
      var ResizeObservation = function() {
        function ResizeObservation2(target, observedBox) {
          this.target = target;
          this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;
          this.lastReportedSize = {
            inlineSize: 0,
            blockSize: 0
          };
        }
        ResizeObservation2.prototype.isActive = function() {
          var size2 = calculateBoxSize(this.target, this.observedBox, true);
          if (skipNotifyOnElement(this.target)) {
            this.lastReportedSize = size2;
          }
          if (this.lastReportedSize.inlineSize !== size2.inlineSize || this.lastReportedSize.blockSize !== size2.blockSize) {
            return true;
          }
          return false;
        };
        return ResizeObservation2;
      }();
      var ResizeObserverDetail = function() {
        function ResizeObserverDetail2(resizeObserver, callback) {
          this.activeTargets = [];
          this.skippedTargets = [];
          this.observationTargets = [];
          this.observer = resizeObserver;
          this.callback = callback;
        }
        return ResizeObserverDetail2;
      }();
      var observerMap = /* @__PURE__ */ new WeakMap();
      var getObservationIndex = function(observationTargets, target) {
        for (var i = 0; i < observationTargets.length; i += 1) {
          if (observationTargets[i].target === target) {
            return i;
          }
        }
        return -1;
      };
      var ResizeObserverController = function() {
        function ResizeObserverController2() {
        }
        ResizeObserverController2.connect = function(resizeObserver, callback) {
          var detail = new ResizeObserverDetail(resizeObserver, callback);
          observerMap.set(resizeObserver, detail);
        };
        ResizeObserverController2.observe = function(resizeObserver, target, options) {
          var detail = observerMap.get(resizeObserver);
          var firstObservation = detail.observationTargets.length === 0;
          if (getObservationIndex(detail.observationTargets, target) < 0) {
            firstObservation && resizeObservers.push(detail);
            detail.observationTargets.push(new ResizeObservation(target, options && options.box));
            updateCount(1);
            scheduler.schedule();
          }
        };
        ResizeObserverController2.unobserve = function(resizeObserver, target) {
          var detail = observerMap.get(resizeObserver);
          var index = getObservationIndex(detail.observationTargets, target);
          var lastObservation = detail.observationTargets.length === 1;
          if (index >= 0) {
            lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);
            detail.observationTargets.splice(index, 1);
            updateCount(-1);
          }
        };
        ResizeObserverController2.disconnect = function(resizeObserver) {
          var _this = this;
          var detail = observerMap.get(resizeObserver);
          detail.observationTargets.slice().forEach(function(ot) {
            return _this.unobserve(resizeObserver, ot.target);
          });
          detail.activeTargets.splice(0, detail.activeTargets.length);
        };
        return ResizeObserverController2;
      }();
      var ResizeObserver = function() {
        function ResizeObserver2(callback) {
          if (arguments.length === 0) {
            throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
          }
          if (typeof callback !== "function") {
            throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
          }
          ResizeObserverController.connect(this, callback);
        }
        ResizeObserver2.prototype.observe = function(target, options) {
          if (arguments.length === 0) {
            throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
          }
          if (!isElement$1(target)) {
            throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
          }
          ResizeObserverController.observe(this, target, options);
        };
        ResizeObserver2.prototype.unobserve = function(target) {
          if (arguments.length === 0) {
            throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
          }
          if (!isElement$1(target)) {
            throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
          }
          ResizeObserverController.unobserve(this, target);
        };
        ResizeObserver2.prototype.disconnect = function() {
          ResizeObserverController.disconnect(this);
        };
        ResizeObserver2.toString = function() {
          return "function ResizeObserver () { [polyfill code] }";
        };
        return ResizeObserver2;
      }();
      class ResizeObserverDelegate {
        constructor() {
          this.handleResize = this.handleResize.bind(this);
          this.observer = new (typeof window !== "undefined" && window.ResizeObserver || ResizeObserver)(this.handleResize);
          this.elHandlersMap = /* @__PURE__ */ new Map();
        }
        handleResize(entries) {
          for (const entry of entries) {
            const handler = this.elHandlersMap.get(entry.target);
            if (handler !== void 0) {
              handler(entry);
            }
          }
        }
        registerHandler(el, handler) {
          this.elHandlersMap.set(el, handler);
          this.observer.observe(el);
        }
        unregisterHandler(el) {
          if (!this.elHandlersMap.has(el)) {
            return;
          }
          this.elHandlersMap.delete(el);
          this.observer.unobserve(el);
        }
      }
      const resizeObserverManager = new ResizeObserverDelegate();
      const VResizeObserver = vue.defineComponent({
        name: "ResizeObserver",
        props: {
          onResize: Function
        },
        setup(props) {
          let registered = false;
          const proxy = vue.getCurrentInstance().proxy;
          function handleResize(entry) {
            const { onResize } = props;
            if (onResize !== void 0)
              onResize(entry);
          }
          vue.onMounted(() => {
            const el = proxy.$el;
            if (el === void 0) {
              warn("resize-observer", "$el does not exist.");
              return;
            }
            if (el.nextElementSibling !== el.nextSibling) {
              if (el.nodeType === 3 && el.nodeValue !== "") {
                warn("resize-observer", "$el can not be observed (it may be a text node).");
                return;
              }
            }
            if (el.nextElementSibling !== null) {
              resizeObserverManager.registerHandler(el.nextElementSibling, handleResize);
              registered = true;
            }
          });
          vue.onBeforeUnmount(() => {
            if (registered) {
              resizeObserverManager.unregisterHandler(proxy.$el.nextElementSibling);
            }
          });
        },
        render() {
          return vue.renderSlot(this.$slots, "default");
        }
      });
      function isHTMLElement(node) {
        return node instanceof HTMLElement;
      }
      function focusFirstDescendant(node) {
        for (let i = 0; i < node.childNodes.length; i++) {
          const child = node.childNodes[i];
          if (isHTMLElement(child)) {
            if (attemptFocus(child) || focusFirstDescendant(child)) {
              return true;
            }
          }
        }
        return false;
      }
      function focusLastDescendant(element) {
        for (let i = element.childNodes.length - 1; i >= 0; i--) {
          const child = element.childNodes[i];
          if (isHTMLElement(child)) {
            if (attemptFocus(child) || focusLastDescendant(child)) {
              return true;
            }
          }
        }
        return false;
      }
      function attemptFocus(element) {
        if (!isFocusable(element)) {
          return false;
        }
        try {
          element.focus({ preventScroll: true });
        } catch (e) {
        }
        return document.activeElement === element;
      }
      function isFocusable(element) {
        if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) {
          return true;
        }
        if (element.getAttribute("disabled")) {
          return false;
        }
        switch (element.nodeName) {
          case "A":
            return !!element.href && element.rel !== "ignore";
          case "INPUT":
            return element.type !== "hidden" && element.type !== "file";
          case "BUTTON":
          case "SELECT":
          case "TEXTAREA":
            return true;
          default:
            return false;
        }
      }
      let stack = [];
      const FocusTrap = vue.defineComponent({
        name: "FocusTrap",
        props: {
          disabled: Boolean,
          active: Boolean,
          autoFocus: {
            type: Boolean,
            default: true
          },
          onEsc: Function,
          initialFocusTo: String,
          finalFocusTo: String,
          returnFocusOnDeactivated: {
            type: Boolean,
            default: true
          }
        },
        setup(props) {
          const id = createId();
          const focusableStartRef = vue.ref(null);
          const focusableEndRef = vue.ref(null);
          let activated = false;
          let ignoreInternalFocusChange = false;
          const lastFocusedElement = typeof document === "undefined" ? null : document.activeElement;
          function isCurrentActive() {
            const currentActiveId = stack[stack.length - 1];
            return currentActiveId === id;
          }
          function handleDocumentKeydown(e) {
            var _a;
            if (e.code === "Escape") {
              if (isCurrentActive()) {
                (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props, e);
              }
            }
          }
          vue.onMounted(() => {
            vue.watch(() => props.active, (value) => {
              if (value) {
                activate();
                on("keydown", document, handleDocumentKeydown);
              } else {
                off("keydown", document, handleDocumentKeydown);
                if (activated) {
                  deactivate();
                }
              }
            }, {
              immediate: true
            });
          });
          vue.onBeforeUnmount(() => {
            off("keydown", document, handleDocumentKeydown);
            if (activated)
              deactivate();
          });
          function handleDocumentFocus(e) {
            if (ignoreInternalFocusChange)
              return;
            if (isCurrentActive()) {
              const mainEl = getMainEl();
              if (mainEl === null)
                return;
              if (mainEl.contains(getPreciseEventTarget(e)))
                return;
              resetFocusTo("first");
            }
          }
          function getMainEl() {
            const focusableStartEl = focusableStartRef.value;
            if (focusableStartEl === null)
              return null;
            let mainEl = focusableStartEl;
            while (true) {
              mainEl = mainEl.nextSibling;
              if (mainEl === null)
                break;
              if (mainEl instanceof Element && mainEl.tagName === "DIV") {
                break;
              }
            }
            return mainEl;
          }
          function activate() {
            var _a;
            if (props.disabled)
              return;
            stack.push(id);
            if (props.autoFocus) {
              const { initialFocusTo } = props;
              if (initialFocusTo === void 0) {
                resetFocusTo("first");
              } else {
                (_a = resolveTo(initialFocusTo)) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
              }
            }
            activated = true;
            document.addEventListener("focus", handleDocumentFocus, true);
          }
          function deactivate() {
            var _a;
            if (props.disabled)
              return;
            document.removeEventListener("focus", handleDocumentFocus, true);
            stack = stack.filter((idInStack) => idInStack !== id);
            if (isCurrentActive())
              return;
            const { finalFocusTo } = props;
            if (finalFocusTo !== void 0) {
              (_a = resolveTo(finalFocusTo)) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
            } else if (props.returnFocusOnDeactivated) {
              if (lastFocusedElement instanceof HTMLElement) {
                ignoreInternalFocusChange = true;
                lastFocusedElement.focus({ preventScroll: true });
                ignoreInternalFocusChange = false;
              }
            }
          }
          function resetFocusTo(target) {
            if (!isCurrentActive())
              return;
            if (props.active) {
              const focusableStartEl = focusableStartRef.value;
              const focusableEndEl = focusableEndRef.value;
              if (focusableStartEl !== null && focusableEndEl !== null) {
                const mainEl = getMainEl();
                if (mainEl == null || mainEl === focusableEndEl) {
                  ignoreInternalFocusChange = true;
                  focusableStartEl.focus({ preventScroll: true });
                  ignoreInternalFocusChange = false;
                  return;
                }
                ignoreInternalFocusChange = true;
                const focused = target === "first" ? focusFirstDescendant(mainEl) : focusLastDescendant(mainEl);
                ignoreInternalFocusChange = false;
                if (!focused) {
                  ignoreInternalFocusChange = true;
                  focusableStartEl.focus({ preventScroll: true });
                  ignoreInternalFocusChange = false;
                }
              }
            }
          }
          function handleStartFocus(e) {
            if (ignoreInternalFocusChange)
              return;
            const mainEl = getMainEl();
            if (mainEl === null)
              return;
            if (e.relatedTarget !== null && mainEl.contains(e.relatedTarget)) {
              resetFocusTo("last");
            } else {
              resetFocusTo("first");
            }
          }
          function handleEndFocus(e) {
            if (ignoreInternalFocusChange)
              return;
            if (e.relatedTarget !== null && e.relatedTarget === focusableStartRef.value) {
              resetFocusTo("last");
            } else {
              resetFocusTo("first");
            }
          }
          return {
            focusableStartRef,
            focusableEndRef,
            focusableStyle: "position: absolute; height: 0; width: 0;",
            handleStartFocus,
            handleEndFocus
          };
        },
        render() {
          const { default: defaultSlot } = this.$slots;
          if (defaultSlot === void 0)
            return null;
          if (this.disabled)
            return defaultSlot();
          const { active, focusableStyle } = this;
          return vue.h(vue.Fragment, null, [
            vue.h("div", {
              "aria-hidden": "true",
              tabindex: active ? "0" : "-1",
              ref: "focusableStartRef",
              style: focusableStyle,
              onFocus: this.handleStartFocus
            }),
            defaultSlot(),
            vue.h("div", {
              "aria-hidden": "true",
              style: focusableStyle,
              ref: "focusableEndRef",
              tabindex: active ? "0" : "-1",
              onFocus: this.handleEndFocus
            })
          ]);
        }
      });
      let lockCount = 0;
      let originalMarginRight = "";
      let originalOverflow = "";
      let originalOverflowX = "";
      let originalOverflowY = "";
      const lockHtmlScrollRightCompensationRef = vue.ref("0px");
      function useLockHtmlScroll(lockRef) {
        if (typeof document === "undefined")
          return;
        const el = document.documentElement;
        let watchStopHandle;
        let activated = false;
        const unlock = () => {
          el.style.marginRight = originalMarginRight;
          el.style.overflow = originalOverflow;
          el.style.overflowX = originalOverflowX;
          el.style.overflowY = originalOverflowY;
          lockHtmlScrollRightCompensationRef.value = "0px";
        };
        vue.onMounted(() => {
          watchStopHandle = vue.watch(lockRef, (value) => {
            if (value) {
              if (!lockCount) {
                const scrollbarWidth = window.innerWidth - el.offsetWidth;
                if (scrollbarWidth > 0) {
                  originalMarginRight = el.style.marginRight;
                  el.style.marginRight = `${scrollbarWidth}px`;
                  lockHtmlScrollRightCompensationRef.value = `${scrollbarWidth}px`;
                }
                originalOverflow = el.style.overflow;
                originalOverflowX = el.style.overflowX;
                originalOverflowY = el.style.overflowY;
                el.style.overflow = "hidden";
                el.style.overflowX = "hidden";
                el.style.overflowY = "hidden";
              }
              activated = true;
              lockCount++;
            } else {
              lockCount--;
              if (!lockCount) {
                unlock();
              }
              activated = false;
            }
          }, {
            immediate: true
          });
        });
        vue.onBeforeUnmount(() => {
          watchStopHandle === null || watchStopHandle === void 0 ? void 0 : watchStopHandle();
          if (activated) {
            lockCount--;
            if (!lockCount) {
              unlock();
            }
            activated = false;
          }
        });
      }
      const isComposingRef = vue.ref(false);
      const compositionStartHandler = () => {
        isComposingRef.value = true;
      };
      const compositionEndHandler = () => {
        isComposingRef.value = false;
      };
      let mountedCount = 0;
      const useIsComposing = () => {
        if (isBrowser$2) {
          vue.onBeforeMount(() => {
            if (!mountedCount) {
              window.addEventListener("compositionstart", compositionStartHandler);
              window.addEventListener("compositionend", compositionEndHandler);
            }
            mountedCount++;
          });
          vue.onBeforeUnmount(() => {
            if (mountedCount <= 1) {
              window.removeEventListener("compositionstart", compositionStartHandler);
              window.removeEventListener("compositionend", compositionEndHandler);
              mountedCount = 0;
            } else {
              mountedCount--;
            }
          });
        }
        return isComposingRef;
      };
      function useReactivated(callback) {
        const isDeactivatedRef = {
          isDeactivated: false
        };
        let activateStateInitialized = false;
        vue.onActivated(() => {
          isDeactivatedRef.isDeactivated = false;
          if (!activateStateInitialized) {
            activateStateInitialized = true;
            return;
          }
          callback();
        });
        vue.onDeactivated(() => {
          isDeactivatedRef.isDeactivated = true;
          if (!activateStateInitialized) {
            activateStateInitialized = true;
          }
        });
        return isDeactivatedRef;
      }
      const formItemInjectionKey = createInjectionKey("n-form-item");
      function useFormItem(props, {
        defaultSize = "medium",
        mergedSize,
        mergedDisabled
      } = {}) {
        const NFormItem = vue.inject(formItemInjectionKey, null);
        vue.provide(formItemInjectionKey, null);
        const mergedSizeRef = vue.computed(mergedSize ? () => mergedSize(NFormItem) : () => {
          const {
            size: size2
          } = props;
          if (size2)
            return size2;
          if (NFormItem) {
            const {
              mergedSize: mergedSize2
            } = NFormItem;
            if (mergedSize2.value !== void 0) {
              return mergedSize2.value;
            }
          }
          return defaultSize;
        });
        const mergedDisabledRef = vue.computed(mergedDisabled ? () => mergedDisabled(NFormItem) : () => {
          const {
            disabled
          } = props;
          if (disabled !== void 0) {
            return disabled;
          }
          if (NFormItem) {
            return NFormItem.disabled.value;
          }
          return false;
        });
        const mergedStatusRef = vue.computed(() => {
          const {
            status
          } = props;
          if (status)
            return status;
          return NFormItem === null || NFormItem === void 0 ? void 0 : NFormItem.mergedValidationStatus.value;
        });
        vue.onBeforeUnmount(() => {
          if (NFormItem) {
            NFormItem.restoreValidation();
          }
        });
        return {
          mergedSizeRef,
          mergedDisabledRef,
          mergedStatusRef,
          nTriggerFormBlur() {
            if (NFormItem) {
              NFormItem.handleContentBlur();
            }
          },
          nTriggerFormChange() {
            if (NFormItem) {
              NFormItem.handleContentChange();
            }
          },
          nTriggerFormFocus() {
            if (NFormItem) {
              NFormItem.handleContentFocus();
            }
          },
          nTriggerFormInput() {
            if (NFormItem) {
              NFormItem.handleContentInput();
            }
          }
        };
      }
      var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
      const freeGlobal$1 = freeGlobal;
      var freeSelf = typeof self == "object" && self && self.Object === Object && self;
      var root = freeGlobal$1 || freeSelf || Function("return this")();
      const root$1 = root;
      var Symbol$1 = root$1.Symbol;
      const Symbol$2 = Symbol$1;
      var objectProto$a = Object.prototype;
      var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
      var nativeObjectToString$1 = objectProto$a.toString;
      var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
      function getRawTag(value) {
        var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1];
        try {
          value[symToStringTag$1] = void 0;
          var unmasked = true;
        } catch (e) {
        }
        var result = nativeObjectToString$1.call(value);
        if (unmasked) {
          if (isOwn) {
            value[symToStringTag$1] = tag;
          } else {
            delete value[symToStringTag$1];
          }
        }
        return result;
      }
      var objectProto$9 = Object.prototype;
      var nativeObjectToString = objectProto$9.toString;
      function objectToString$1(value) {
        return nativeObjectToString.call(value);
      }
      var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
      var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
      function baseGetTag(value) {
        if (value == null) {
          return value === void 0 ? undefinedTag : nullTag;
        }
        return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString$1(value);
      }
      function isObjectLike(value) {
        return value != null && typeof value == "object";
      }
      var symbolTag = "[object Symbol]";
      function isSymbol$1(value) {
        return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
      }
      function arrayMap(array, iteratee) {
        var index = -1, length = array == null ? 0 : array.length, result = Array(length);
        while (++index < length) {
          result[index] = iteratee(array[index], index, array);
        }
        return result;
      }
      var isArray$5 = Array.isArray;
      const isArray$6 = isArray$5;
      var INFINITY = 1 / 0;
      var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
      function baseToString(value) {
        if (typeof value == "string") {
          return value;
        }
        if (isArray$6(value)) {
          return arrayMap(value, baseToString) + "";
        }
        if (isSymbol$1(value)) {
          return symbolToString ? symbolToString.call(value) : "";
        }
        var result = value + "";
        return result == "0" && 1 / value == -INFINITY ? "-0" : result;
      }
      function isObject$1(value) {
        var type = typeof value;
        return value != null && (type == "object" || type == "function");
      }
      function identity(value) {
        return value;
      }
      var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
      function isFunction$1(value) {
        if (!isObject$1(value)) {
          return false;
        }
        var tag = baseGetTag(value);
        return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
      }
      var coreJsData = root$1["__core-js_shared__"];
      const coreJsData$1 = coreJsData;
      var maskSrcKey = function() {
        var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
        return uid ? "Symbol(src)_1." + uid : "";
      }();
      function isMasked(func) {
        return !!maskSrcKey && maskSrcKey in func;
      }
      var funcProto$2 = Function.prototype;
      var funcToString$2 = funcProto$2.toString;
      function toSource(func) {
        if (func != null) {
          try {
            return funcToString$2.call(func);
          } catch (e) {
          }
          try {
            return func + "";
          } catch (e) {
          }
        }
        return "";
      }
      var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
      var reIsHostCtor = /^\[object .+?Constructor\]$/;
      var funcProto$1 = Function.prototype, objectProto$8 = Object.prototype;
      var funcToString$1 = funcProto$1.toString;
      var hasOwnProperty$8 = objectProto$8.hasOwnProperty;
      var reIsNative = RegExp(
        "^" + funcToString$1.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
      );
      function baseIsNative(value) {
        if (!isObject$1(value) || isMasked(value)) {
          return false;
        }
        var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
        return pattern.test(toSource(value));
      }
      function getValue(object, key) {
        return object == null ? void 0 : object[key];
      }
      function getNative(object, key) {
        var value = getValue(object, key);
        return baseIsNative(value) ? value : void 0;
      }
      var objectCreate = Object.create;
      var baseCreate = function() {
        function object() {
        }
        return function(proto) {
          if (!isObject$1(proto)) {
            return {};
          }
          if (objectCreate) {
            return objectCreate(proto);
          }
          object.prototype = proto;
          var result = new object();
          object.prototype = void 0;
          return result;
        };
      }();
      const baseCreate$1 = baseCreate;
      function apply(func, thisArg, args) {
        switch (args.length) {
          case 0:
            return func.call(thisArg);
          case 1:
            return func.call(thisArg, args[0]);
          case 2:
            return func.call(thisArg, args[0], args[1]);
          case 3:
            return func.call(thisArg, args[0], args[1], args[2]);
        }
        return func.apply(thisArg, args);
      }
      function copyArray(source, array) {
        var index = -1, length = source.length;
        array || (array = Array(length));
        while (++index < length) {
          array[index] = source[index];
        }
        return array;
      }
      var HOT_COUNT = 800, HOT_SPAN = 16;
      var nativeNow = Date.now;
      function shortOut(func) {
        var count = 0, lastCalled = 0;
        return function() {
          var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
          lastCalled = stamp;
          if (remaining > 0) {
            if (++count >= HOT_COUNT) {
              return arguments[0];
            }
          } else {
            count = 0;
          }
          return func.apply(void 0, arguments);
        };
      }
      function constant(value) {
        return function() {
          return value;
        };
      }
      var defineProperty = function() {
        try {
          var func = getNative(Object, "defineProperty");
          func({}, "", {});
          return func;
        } catch (e) {
        }
      }();
      const defineProperty$1 = defineProperty;
      var baseSetToString = !defineProperty$1 ? identity : function(func, string) {
        return defineProperty$1(func, "toString", {
          "configurable": true,
          "enumerable": false,
          "value": constant(string),
          "writable": true
        });
      };
      const baseSetToString$1 = baseSetToString;
      var setToString = shortOut(baseSetToString$1);
      const setToString$1 = setToString;
      var MAX_SAFE_INTEGER$1 = 9007199254740991;
      var reIsUint = /^(?:0|[1-9]\d*)$/;
      function isIndex(value, length) {
        var type = typeof value;
        length = length == null ? MAX_SAFE_INTEGER$1 : length;
        return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
      }
      function baseAssignValue(object, key, value) {
        if (key == "__proto__" && defineProperty$1) {
          defineProperty$1(object, key, {
            "configurable": true,
            "enumerable": true,
            "value": value,
            "writable": true
          });
        } else {
          object[key] = value;
        }
      }
      function eq(value, other) {
        return value === other || value !== value && other !== other;
      }
      var objectProto$7 = Object.prototype;
      var hasOwnProperty$7 = objectProto$7.hasOwnProperty;
      function assignValue(object, key, value) {
        var objValue = object[key];
        if (!(hasOwnProperty$7.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
          baseAssignValue(object, key, value);
        }
      }
      function copyObject(source, props, object, customizer) {
        var isNew = !object;
        object || (object = {});
        var index = -1, length = props.length;
        while (++index < length) {
          var key = props[index];
          var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
          if (newValue === void 0) {
            newValue = source[key];
          }
          if (isNew) {
            baseAssignValue(object, key, newValue);
          } else {
            assignValue(object, key, newValue);
          }
        }
        return object;
      }
      var nativeMax = Math.max;
      function overRest(func, start, transform) {
        start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
        return function() {
          var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
          while (++index < length) {
            array[index] = args[start + index];
          }
          index = -1;
          var otherArgs = Array(start + 1);
          while (++index < start) {
            otherArgs[index] = args[index];
          }
          otherArgs[start] = transform(array);
          return apply(func, this, otherArgs);
        };
      }
      function baseRest(func, start) {
        return setToString$1(overRest(func, start, identity), func + "");
      }
      var MAX_SAFE_INTEGER = 9007199254740991;
      function isLength(value) {
        return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
      }
      function isArrayLike(value) {
        return value != null && isLength(value.length) && !isFunction$1(value);
      }
      function isIterateeCall(value, index, object) {
        if (!isObject$1(object)) {
          return false;
        }
        var type = typeof index;
        if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
          return eq(object[index], value);
        }
        return false;
      }
      function createAssigner(assigner) {
        return baseRest(function(object, sources) {
          var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
          customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
          if (guard && isIterateeCall(sources[0], sources[1], guard)) {
            customizer = length < 3 ? void 0 : customizer;
            length = 1;
          }
          object = Object(object);
          while (++index < length) {
            var source = sources[index];
            if (source) {
              assigner(object, source, index, customizer);
            }
          }
          return object;
        });
      }
      var objectProto$6 = Object.prototype;
      function isPrototype(value) {
        var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$6;
        return value === proto;
      }
      function baseTimes(n, iteratee) {
        var index = -1, result = Array(n);
        while (++index < n) {
          result[index] = iteratee(index);
        }
        return result;
      }
      var argsTag$1 = "[object Arguments]";
      function baseIsArguments(value) {
        return isObjectLike(value) && baseGetTag(value) == argsTag$1;
      }
      var objectProto$5 = Object.prototype;
      var hasOwnProperty$6 = objectProto$5.hasOwnProperty;
      var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
      var isArguments = baseIsArguments(function() {
        return arguments;
      }()) ? baseIsArguments : function(value) {
        return isObjectLike(value) && hasOwnProperty$6.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
      };
      const isArguments$1 = isArguments;
      function stubFalse() {
        return false;
      }
      var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
      var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
      var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
      var Buffer$2 = moduleExports$2 ? root$1.Buffer : void 0;
      var nativeIsBuffer = Buffer$2 ? Buffer$2.isBuffer : void 0;
      var isBuffer$2 = nativeIsBuffer || stubFalse;
      const isBuffer$3 = isBuffer$2;
      var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag$1 = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]";
      var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
      var typedArrayTags = {};
      typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
      typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
      function baseIsTypedArray(value) {
        return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
      }
      function baseUnary(func) {
        return function(value) {
          return func(value);
        };
      }
      var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
      var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
      var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
      var freeProcess = moduleExports$1 && freeGlobal$1.process;
      var nodeUtil = function() {
        try {
          var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
          if (types) {
            return types;
          }
          return freeProcess && freeProcess.binding && freeProcess.binding("util");
        } catch (e) {
        }
      }();
      const nodeUtil$1 = nodeUtil;
      var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
      var isTypedArray$1 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
      const isTypedArray$2 = isTypedArray$1;
      var objectProto$4 = Object.prototype;
      var hasOwnProperty$5 = objectProto$4.hasOwnProperty;
      function arrayLikeKeys(value, inherited) {
        var isArr = isArray$6(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$3(value), isType = !isArr && !isArg && !isBuff && isTypedArray$2(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
        for (var key in value) {
          if ((inherited || hasOwnProperty$5.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
          (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
          isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
          isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
          isIndex(key, length)))) {
            result.push(key);
          }
        }
        return result;
      }
      function overArg(func, transform) {
        return function(arg) {
          return func(transform(arg));
        };
      }
      function nativeKeysIn(object) {
        var result = [];
        if (object != null) {
          for (var key in Object(object)) {
            result.push(key);
          }
        }
        return result;
      }
      var objectProto$3 = Object.prototype;
      var hasOwnProperty$4 = objectProto$3.hasOwnProperty;
      function baseKeysIn(object) {
        if (!isObject$1(object)) {
          return nativeKeysIn(object);
        }
        var isProto = isPrototype(object), result = [];
        for (var key in object) {
          if (!(key == "constructor" && (isProto || !hasOwnProperty$4.call(object, key)))) {
            result.push(key);
          }
        }
        return result;
      }
      function keysIn(object) {
        return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
      }
      var nativeCreate = getNative(Object, "create");
      const nativeCreate$1 = nativeCreate;
      function hashClear() {
        this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
        this.size = 0;
      }
      function hashDelete(key) {
        var result = this.has(key) && delete this.__data__[key];
        this.size -= result ? 1 : 0;
        return result;
      }
      var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
      var objectProto$2 = Object.prototype;
      var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
      function hashGet(key) {
        var data = this.__data__;
        if (nativeCreate$1) {
          var result = data[key];
          return result === HASH_UNDEFINED$1 ? void 0 : result;
        }
        return hasOwnProperty$3.call(data, key) ? data[key] : void 0;
      }
      var objectProto$1 = Object.prototype;
      var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
      function hashHas(key) {
        var data = this.__data__;
        return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$2.call(data, key);
      }
      var HASH_UNDEFINED = "__lodash_hash_undefined__";
      function hashSet(key, value) {
        var data = this.__data__;
        this.size += this.has(key) ? 0 : 1;
        data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED : value;
        return this;
      }
      function Hash(entries) {
        var index = -1, length = entries == null ? 0 : entries.length;
        this.clear();
        while (++index < length) {
          var entry = entries[index];
          this.set(entry[0], entry[1]);
        }
      }
      Hash.prototype.clear = hashClear;
      Hash.prototype["delete"] = hashDelete;
      Hash.prototype.get = hashGet;
      Hash.prototype.has = hashHas;
      Hash.prototype.set = hashSet;
      function listCacheClear() {
        this.__data__ = [];
        this.size = 0;
      }
      function assocIndexOf(array, key) {
        var length = array.length;
        while (length--) {
          if (eq(array[length][0], key)) {
            return length;
          }
        }
        return -1;
      }
      var arrayProto = Array.prototype;
      var splice = arrayProto.splice;
      function listCacheDelete(key) {
        var data = this.__data__, index = assocIndexOf(data, key);
        if (index < 0) {
          return false;
        }
        var lastIndex = data.length - 1;
        if (index == lastIndex) {
          data.pop();
        } else {
          splice.call(data, index, 1);
        }
        --this.size;
        return true;
      }
      function listCacheGet(key) {
        var data = this.__data__, index = assocIndexOf(data, key);
        return index < 0 ? void 0 : data[index][1];
      }
      function listCacheHas(key) {
        return assocIndexOf(this.__data__, key) > -1;
      }
      function listCacheSet(key, value) {
        var data = this.__data__, index = assocIndexOf(data, key);
        if (index < 0) {
          ++this.size;
          data.push([key, value]);
        } else {
          data[index][1] = value;
        }
        return this;
      }
      function ListCache(entries) {
        var index = -1, length = entries == null ? 0 : entries.length;
        this.clear();
        while (++index < length) {
          var entry = entries[index];
          this.set(entry[0], entry[1]);
        }
      }
      ListCache.prototype.clear = listCacheClear;
      ListCache.prototype["delete"] = listCacheDelete;
      ListCache.prototype.get = listCacheGet;
      ListCache.prototype.has = listCacheHas;
      ListCache.prototype.set = listCacheSet;
      var Map$1 = getNative(root$1, "Map");
      const Map$2 = Map$1;
      function mapCacheClear() {
        this.size = 0;
        this.__data__ = {
          "hash": new Hash(),
          "map": new (Map$2 || ListCache)(),
          "string": new Hash()
        };
      }
      function isKeyable(value) {
        var type = typeof value;
        return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
      }
      function getMapData(map, key) {
        var data = map.__data__;
        return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
      }
      function mapCacheDelete(key) {
        var result = getMapData(this, key)["delete"](key);
        this.size -= result ? 1 : 0;
        return result;
      }
      function mapCacheGet(key) {
        return getMapData(this, key).get(key);
      }
      function mapCacheHas(key) {
        return getMapData(this, key).has(key);
      }
      function mapCacheSet(key, value) {
        var data = getMapData(this, key), size2 = data.size;
        data.set(key, value);
        this.size += data.size == size2 ? 0 : 1;
        return this;
      }
      function MapCache(entries) {
        var index = -1, length = entries == null ? 0 : entries.length;
        this.clear();
        while (++index < length) {
          var entry = entries[index];
          this.set(entry[0], entry[1]);
        }
      }
      MapCache.prototype.clear = mapCacheClear;
      MapCache.prototype["delete"] = mapCacheDelete;
      MapCache.prototype.get = mapCacheGet;
      MapCache.prototype.has = mapCacheHas;
      MapCache.prototype.set = mapCacheSet;
      function toString$1(value) {
        return value == null ? "" : baseToString(value);
      }
      var getPrototype = overArg(Object.getPrototypeOf, Object);
      const getPrototype$1 = getPrototype;
      var objectTag = "[object Object]";
      var funcProto = Function.prototype, objectProto = Object.prototype;
      var funcToString = funcProto.toString;
      var hasOwnProperty$1 = objectProto.hasOwnProperty;
      var objectCtorString = funcToString.call(Object);
      function isPlainObject$1(value) {
        if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
          return false;
        }
        var proto = getPrototype$1(value);
        if (proto === null) {
          return true;
        }
        var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
        return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
      }
      function baseSlice(array, start, end) {
        var index = -1, length = array.length;
        if (start < 0) {
          start = -start > length ? 0 : length + start;
        }
        end = end > length ? length : end;
        if (end < 0) {
          end += length;
        }
        length = start > end ? 0 : end - start >>> 0;
        start >>>= 0;
        var result = Array(length);
        while (++index < length) {
          result[index] = array[index + start];
        }
        return result;
      }
      function castSlice(array, start, end) {
        var length = array.length;
        end = end === void 0 ? length : end;
        return !start && end >= length ? array : baseSlice(array, start, end);
      }
      var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
      var rsZWJ$1 = "\\u200d";
      var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
      function hasUnicode(string) {
        return reHasUnicode.test(string);
      }
      function asciiToArray(string) {
        return string.split("");
      }
      var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
      var rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d";
      var reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
      var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
      function unicodeToArray(string) {
        return string.match(reUnicode) || [];
      }
      function stringToArray(string) {
        return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
      }
      function createCaseFirst(methodName) {
        return function(string) {
          string = toString$1(string);
          var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
          var chr = strSymbols ? strSymbols[0] : string.charAt(0);
          var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
          return chr[methodName]() + trailing;
        };
      }
      var upperFirst = createCaseFirst("toUpperCase");
      const upperFirst$1 = upperFirst;
      function stackClear() {
        this.__data__ = new ListCache();
        this.size = 0;
      }
      function stackDelete(key) {
        var data = this.__data__, result = data["delete"](key);
        this.size = data.size;
        return result;
      }
      function stackGet(key) {
        return this.__data__.get(key);
      }
      function stackHas(key) {
        return this.__data__.has(key);
      }
      var LARGE_ARRAY_SIZE = 200;
      function stackSet(key, value) {
        var data = this.__data__;
        if (data instanceof ListCache) {
          var pairs = data.__data__;
          if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
            pairs.push([key, value]);
            this.size = ++data.size;
            return this;
          }
          data = this.__data__ = new MapCache(pairs);
        }
        data.set(key, value);
        this.size = data.size;
        return this;
      }
      function Stack(entries) {
        var data = this.__data__ = new ListCache(entries);
        this.size = data.size;
      }
      Stack.prototype.clear = stackClear;
      Stack.prototype["delete"] = stackDelete;
      Stack.prototype.get = stackGet;
      Stack.prototype.has = stackHas;
      Stack.prototype.set = stackSet;
      var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
      var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
      var moduleExports = freeModule && freeModule.exports === freeExports;
      var Buffer$1 = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : void 0;
      function cloneBuffer(buffer, isDeep) {
        if (isDeep) {
          return buffer.slice();
        }
        var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
        buffer.copy(result);
        return result;
      }
      var Uint8Array$1 = root$1.Uint8Array;
      const Uint8Array$2 = Uint8Array$1;
      function cloneArrayBuffer(arrayBuffer) {
        var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
        new Uint8Array$2(result).set(new Uint8Array$2(arrayBuffer));
        return result;
      }
      function cloneTypedArray(typedArray, isDeep) {
        var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
        return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
      }
      function initCloneObject(object) {
        return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
      }
      function createBaseFor(fromRight) {
        return function(object, iteratee, keysFunc) {
          var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
          while (length--) {
            var key = props[fromRight ? length : ++index];
            if (iteratee(iterable[key], key, iterable) === false) {
              break;
            }
          }
          return object;
        };
      }
      var baseFor = createBaseFor();
      const baseFor$1 = baseFor;
      function assignMergeValue(object, key, value) {
        if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
          baseAssignValue(object, key, value);
        }
      }
      function isArrayLikeObject(value) {
        return isObjectLike(value) && isArrayLike(value);
      }
      function safeGet(object, key) {
        if (key === "constructor" && typeof object[key] === "function") {
          return;
        }
        if (key == "__proto__") {
          return;
        }
        return object[key];
      }
      function toPlainObject(value) {
        return copyObject(value, keysIn(value));
      }
      function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack2) {
        var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack2.get(srcValue);
        if (stacked) {
          assignMergeValue(object, key, stacked);
          return;
        }
        var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack2) : void 0;
        var isCommon = newValue === void 0;
        if (isCommon) {
          var isArr = isArray$6(srcValue), isBuff = !isArr && isBuffer$3(srcValue), isTyped = !isArr && !isBuff && isTypedArray$2(srcValue);
          newValue = srcValue;
          if (isArr || isBuff || isTyped) {
            if (isArray$6(objValue)) {
              newValue = objValue;
            } else if (isArrayLikeObject(objValue)) {
              newValue = copyArray(objValue);
            } else if (isBuff) {
              isCommon = false;
              newValue = cloneBuffer(srcValue, true);
            } else if (isTyped) {
              isCommon = false;
              newValue = cloneTypedArray(srcValue, true);
            } else {
              newValue = [];
            }
          } else if (isPlainObject$1(srcValue) || isArguments$1(srcValue)) {
            newValue = objValue;
            if (isArguments$1(objValue)) {
              newValue = toPlainObject(objValue);
            } else if (!isObject$1(objValue) || isFunction$1(objValue)) {
              newValue = initCloneObject(srcValue);
            }
          } else {
            isCommon = false;
          }
        }
        if (isCommon) {
          stack2.set(srcValue, newValue);
          mergeFunc(newValue, srcValue, srcIndex, customizer, stack2);
          stack2["delete"](srcValue);
        }
        assignMergeValue(object, key, newValue);
      }
      function baseMerge(object, source, srcIndex, customizer, stack2) {
        if (object === source) {
          return;
        }
        baseFor$1(source, function(srcValue, key) {
          stack2 || (stack2 = new Stack());
          if (isObject$1(srcValue)) {
            baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack2);
          } else {
            var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack2) : void 0;
            if (newValue === void 0) {
              newValue = srcValue;
            }
            assignMergeValue(object, key, newValue);
          }
        }, keysIn);
      }
      var merge$2 = createAssigner(function(object, source, srcIndex) {
        baseMerge(object, source, srcIndex);
      });
      const merge$3 = merge$2;
      const commonVariables$3 = {
        fontFamily: 'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
        fontFamilyMono: "v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",
        fontWeight: "400",
        fontWeightStrong: "500",
        cubicBezierEaseInOut: "cubic-bezier(.4, 0, .2, 1)",
        cubicBezierEaseOut: "cubic-bezier(0, 0, .2, 1)",
        cubicBezierEaseIn: "cubic-bezier(.4, 0, 1, 1)",
        borderRadius: "3px",
        borderRadiusSmall: "2px",
        fontSize: "14px",
        fontSizeMini: "12px",
        fontSizeTiny: "12px",
        fontSizeSmall: "14px",
        fontSizeMedium: "14px",
        fontSizeLarge: "15px",
        fontSizeHuge: "16px",
        lineHeight: "1.6",
        heightMini: "16px",
        // private now, it's too small
        heightTiny: "22px",
        heightSmall: "28px",
        heightMedium: "34px",
        heightLarge: "40px",
        heightHuge: "46px"
      };
      const {
        fontSize,
        fontFamily,
        lineHeight
      } = commonVariables$3;
      const globalStyle = c("body", `
 margin: 0;
 font-size: ${fontSize};
 font-family: ${fontFamily};
 line-height: ${lineHeight};
 -webkit-text-size-adjust: 100%;
 -webkit-tap-highlight-color: transparent;
`, [c("input", `
 font-family: inherit;
 font-size: inherit;
 `)]);
      const configProviderInjectionKey = createInjectionKey("n-config-provider");
      const cssrAnchorMetaName = "naive-ui-style";
      function createTheme(theme) {
        return theme;
      }
      function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
        const ssrAdapter2 = useSsrAdapter();
        const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
        if (style2) {
          const mountStyle = () => {
            const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
            style2.mount({
              id: clsPrefix === void 0 ? mountId : clsPrefix + mountId,
              head: true,
              props: {
                bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
              },
              anchorMetaName: cssrAnchorMetaName,
              ssr: ssrAdapter2
            });
            if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
              globalStyle.mount({
                id: "n-global",
                head: true,
                anchorMetaName: cssrAnchorMetaName,
                ssr: ssrAdapter2
              });
            }
          };
          if (ssrAdapter2) {
            mountStyle();
          } else {
            vue.onBeforeMount(mountStyle);
          }
        }
        const mergedThemeRef = vue.computed(() => {
          var _a;
          const {
            theme: {
              common: selfCommon,
              self: self2,
              peers = {}
            } = {},
            themeOverrides: selfOverrides = {},
            builtinThemeOverrides: builtinOverrides = {}
          } = props;
          const {
            common: selfCommonOverrides,
            peers: peersOverrides
          } = selfOverrides;
          const {
            common: globalCommon = void 0,
            [resolveId]: {
              common: globalSelfCommon = void 0,
              self: globalSelf = void 0,
              peers: globalPeers = {}
            } = {}
          } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
          const {
            common: globalCommonOverrides = void 0,
            [resolveId]: globalSelfOverrides = {}
          } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
          const {
            common: globalSelfCommonOverrides,
            peers: globalPeersOverrides = {}
          } = globalSelfOverrides;
          const mergedCommon = merge$3({}, selfCommon || globalSelfCommon || globalCommon || defaultTheme.common, globalCommonOverrides, globalSelfCommonOverrides, selfCommonOverrides);
          const mergedSelf = merge$3(
            // {}, executed every time, no need for empty obj
            (_a = self2 || globalSelf || defaultTheme.self) === null || _a === void 0 ? void 0 : _a(mergedCommon),
            builtinOverrides,
            globalSelfOverrides,
            selfOverrides
          );
          return {
            common: mergedCommon,
            self: mergedSelf,
            peers: merge$3({}, defaultTheme.peers, globalPeers, peers),
            peerOverrides: merge$3({}, builtinOverrides.peers, globalPeersOverrides, peersOverrides)
          };
        });
        return mergedThemeRef;
      }
      useTheme.props = {
        theme: Object,
        themeOverrides: Object,
        builtinThemeOverrides: Object
      };
      const defaultClsPrefix = "n";
      function useConfig(props = {}, options = {
        defaultBordered: true
      }) {
        const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
        return {
          // NConfigProvider,
          inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
          mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
          mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
          mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
          mergedBorderedRef: vue.computed(() => {
            var _a, _b;
            const {
              bordered
            } = props;
            if (bordered !== void 0)
              return bordered;
            return (_b = (_a = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;
          }),
          mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : vue.shallowRef(defaultClsPrefix),
          namespaceRef: vue.computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
        };
      }
      function useStyle(mountId, style2, clsPrefixRef) {
        if (!style2) {
          return;
        }
        const ssrAdapter2 = useSsrAdapter();
        const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
        const mountStyle = () => {
          const clsPrefix = clsPrefixRef.value;
          style2.mount({
            id: clsPrefix === void 0 ? mountId : clsPrefix + mountId,
            head: true,
            anchorMetaName: cssrAnchorMetaName,
            props: {
              bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
            },
            ssr: ssrAdapter2
          });
          if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
            globalStyle.mount({
              id: "n-global",
              head: true,
              anchorMetaName: cssrAnchorMetaName,
              ssr: ssrAdapter2
            });
          }
        };
        if (ssrAdapter2) {
          mountStyle();
        } else {
          vue.onBeforeMount(mountStyle);
        }
      }
      function useThemeClass(componentName, hashRef, cssVarsRef, props) {
        var _a;
        if (!cssVarsRef)
          throwError("useThemeClass", "cssVarsRef is not passed");
        const mergedThemeHashRef = (_a = vue.inject(configProviderInjectionKey, null)) === null || _a === void 0 ? void 0 : _a.mergedThemeHashRef;
        const themeClassRef = vue.ref("");
        const ssrAdapter2 = useSsrAdapter();
        let renderCallback;
        const hashClassPrefix = `__${componentName}`;
        const mountStyle = () => {
          let finalThemeHash = hashClassPrefix;
          const hashValue = hashRef ? hashRef.value : void 0;
          const themeHash = mergedThemeHashRef === null || mergedThemeHashRef === void 0 ? void 0 : mergedThemeHashRef.value;
          if (themeHash)
            finalThemeHash += "-" + themeHash;
          if (hashValue)
            finalThemeHash += "-" + hashValue;
          const {
            themeOverrides,
            builtinThemeOverrides
          } = props;
          if (themeOverrides) {
            finalThemeHash += "-" + murmur2(JSON.stringify(themeOverrides));
          }
          if (builtinThemeOverrides) {
            finalThemeHash += "-" + murmur2(JSON.stringify(builtinThemeOverrides));
          }
          themeClassRef.value = finalThemeHash;
          renderCallback = () => {
            const cssVars = cssVarsRef.value;
            let style2 = "";
            for (const key in cssVars) {
              style2 += `${key}: ${cssVars[key]};`;
            }
            c(`.${finalThemeHash}`, style2).mount({
              id: finalThemeHash,
              ssr: ssrAdapter2
            });
            renderCallback = void 0;
          };
        };
        vue.watchEffect(() => {
          mountStyle();
        });
        return {
          themeClass: themeClassRef,
          onRender: () => {
            renderCallback === null || renderCallback === void 0 ? void 0 : renderCallback();
          }
        };
      }
      function useRtl(mountId, rtlStateRef, clsPrefixRef) {
        if (!rtlStateRef)
          return void 0;
        const ssrAdapter2 = useSsrAdapter();
        const componentRtlStateRef = vue.computed(() => {
          const {
            value: rtlState
          } = rtlStateRef;
          if (!rtlState) {
            return void 0;
          }
          const componentRtlState = rtlState[mountId];
          if (!componentRtlState) {
            return void 0;
          }
          return componentRtlState;
        });
        const mountStyle = () => {
          vue.watchEffect(() => {
            const {
              value: clsPrefix
            } = clsPrefixRef;
            const id = `${clsPrefix}${mountId}Rtl`;
            if (exists(id, ssrAdapter2))
              return;
            const {
              value: componentRtlState
            } = componentRtlStateRef;
            if (!componentRtlState)
              return;
            componentRtlState.style.mount({
              id,
              head: true,
              anchorMetaName: cssrAnchorMetaName,
              props: {
                bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
              },
              ssr: ssrAdapter2
            });
          });
        };
        if (ssrAdapter2) {
          mountStyle();
        } else {
          vue.onBeforeMount(mountStyle);
        }
        return componentRtlStateRef;
      }
      function replaceable(name, icon) {
        return vue.defineComponent({
          name: upperFirst$1(name),
          setup() {
            var _a;
            const mergedIconsRef = (_a = vue.inject(configProviderInjectionKey, null)) === null || _a === void 0 ? void 0 : _a.mergedIconsRef;
            return () => {
              var _a2;
              const iconOverride = (_a2 = mergedIconsRef === null || mergedIconsRef === void 0 ? void 0 : mergedIconsRef.value) === null || _a2 === void 0 ? void 0 : _a2[name];
              return iconOverride ? iconOverride() : icon;
            };
          }
        });
      }
      const ChevronLeftIcon = vue.defineComponent({
        name: "ChevronLeft",
        render() {
          return vue.h("svg", {
            viewBox: "0 0 16 16",
            fill: "none",
            xmlns: "http://www.w3.org/2000/svg"
          }, vue.h("path", {
            d: "M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",
            fill: "currentColor"
          }));
        }
      });
      const ChevronRightIcon = vue.defineComponent({
        name: "ChevronRight",
        render() {
          return vue.h("svg", {
            viewBox: "0 0 16 16",
            fill: "none",
            xmlns: "http://www.w3.org/2000/svg"
          }, vue.h("path", {
            d: "M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",
            fill: "currentColor"
          }));
        }
      });
      const ErrorIcon$1 = replaceable("close", vue.h("svg", {
        viewBox: "0 0 12 12",
        version: "1.1",
        xmlns: "http://www.w3.org/2000/svg",
        "aria-hidden": true
      }, vue.h("g", {
        stroke: "none",
        "stroke-width": "1",
        fill: "none",
        "fill-rule": "evenodd"
      }, vue.h("g", {
        fill: "currentColor",
        "fill-rule": "nonzero"
      }, vue.h("path", {
        d: "M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"
      })))));
      const ErrorIcon = replaceable("error", vue.h("svg", {
        viewBox: "0 0 48 48",
        version: "1.1",
        xmlns: "http://www.w3.org/2000/svg"
      }, vue.h("g", {
        stroke: "none",
        "stroke-width": "1",
        "fill-rule": "evenodd"
      }, vue.h("g", {
        "fill-rule": "nonzero"
      }, vue.h("path", {
        d: "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"
      })))));
      const InfoIcon = replaceable("info", vue.h("svg", {
        viewBox: "0 0 28 28",
        version: "1.1",
        xmlns: "http://www.w3.org/2000/svg"
      }, vue.h("g", {
        stroke: "none",
        "stroke-width": "1",
        "fill-rule": "evenodd"
      }, vue.h("g", {
        "fill-rule": "nonzero"
      }, vue.h("path", {
        d: "M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"
      })))));
      const SuccessIcon = replaceable("success", vue.h("svg", {
        viewBox: "0 0 48 48",
        version: "1.1",
        xmlns: "http://www.w3.org/2000/svg"
      }, vue.h("g", {
        stroke: "none",
        "stroke-width": "1",
        "fill-rule": "evenodd"
      }, vue.h("g", {
        "fill-rule": "nonzero"
      }, vue.h("path", {
        d: "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"
      })))));
      const WarningIcon = replaceable("warning", vue.h("svg", {
        viewBox: "0 0 24 24",
        version: "1.1",
        xmlns: "http://www.w3.org/2000/svg"
      }, vue.h("g", {
        stroke: "none",
        "stroke-width": "1",
        "fill-rule": "evenodd"
      }, vue.h("g", {
        "fill-rule": "nonzero"
      }, vue.h("path", {
        d: "M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"
      })))));
      const NIconSwitchTransition = vue.defineComponent({
        name: "BaseIconSwitchTransition",
        setup(_, {
          slots
        }) {
          const isMountedRef = isMounted();
          return () => vue.h(vue.Transition, {
            name: "icon-switch-transition",
            appear: isMountedRef.value
          }, slots);
        }
      });
      const NFadeInExpandTransition = vue.defineComponent({
        name: "FadeInExpandTransition",
        props: {
          appear: Boolean,
          group: Boolean,
          mode: String,
          onLeave: Function,
          onAfterLeave: Function,
          onAfterEnter: Function,
          width: Boolean,
          // reverse mode is only used in tree
          // it make it from expanded to collapsed after mounted
          reverse: Boolean
        },
        setup(props, {
          slots
        }) {
          function handleBeforeLeave(el) {
            if (props.width) {
              el.style.maxWidth = `${el.offsetWidth}px`;
            } else {
              el.style.maxHeight = `${el.offsetHeight}px`;
            }
            void el.offsetWidth;
          }
          function handleLeave(el) {
            if (props.width) {
              el.style.maxWidth = "0";
            } else {
              el.style.maxHeight = "0";
            }
            void el.offsetWidth;
            const {
              onLeave
            } = props;
            if (onLeave)
              onLeave();
          }
          function handleAfterLeave(el) {
            if (props.width) {
              el.style.maxWidth = "";
            } else {
              el.style.maxHeight = "";
            }
            const {
              onAfterLeave
            } = props;
            if (onAfterLeave)
              onAfterLeave();
          }
          function handleEnter(el) {
            el.style.transition = "none";
            if (props.width) {
              const memorizedWidth = el.offsetWidth;
              el.style.maxWidth = "0";
              void el.offsetWidth;
              el.style.transition = "";
              el.style.maxWidth = `${memorizedWidth}px`;
            } else {
              if (props.reverse) {
                el.style.maxHeight = `${el.offsetHeight}px`;
                void el.offsetHeight;
                el.style.transition = "";
                el.style.maxHeight = "0";
              } else {
                const memorizedHeight = el.offsetHeight;
                el.style.maxHeight = "0";
                void el.offsetWidth;
                el.style.transition = "";
                el.style.maxHeight = `${memorizedHeight}px`;
              }
            }
            void el.offsetWidth;
          }
          function handleAfterEnter(el) {
            var _a;
            if (props.width) {
              el.style.maxWidth = "";
            } else {
              if (!props.reverse) {
                el.style.maxHeight = "";
              }
            }
            (_a = props.onAfterEnter) === null || _a === void 0 ? void 0 : _a.call(props);
          }
          return () => {
            const {
              group,
              width,
              appear,
              mode
            } = props;
            const type = group ? vue.TransitionGroup : vue.Transition;
            const resolvedProps = {
              name: width ? "fade-in-width-expand-transition" : "fade-in-height-expand-transition",
              appear,
              onEnter: handleEnter,
              onAfterEnter: handleAfterEnter,
              onBeforeLeave: handleBeforeLeave,
              onLeave: handleLeave,
              onAfterLeave: handleAfterLeave
            };
            if (!group) {
              resolvedProps.mode = mode;
            }
            return vue.h(type, resolvedProps, slots);
          };
        }
      });
      const style$d = cB("base-icon", `
 height: 1em;
 width: 1em;
 line-height: 1em;
 text-align: center;
 display: inline-block;
 position: relative;
 fill: currentColor;
 transform: translateZ(0);
`, [c("svg", `
 height: 1em;
 width: 1em;
 `)]);
      const NBaseIcon = vue.defineComponent({
        name: "BaseIcon",
        props: {
          role: String,
          ariaLabel: String,
          ariaDisabled: {
            type: Boolean,
            default: void 0
          },
          ariaHidden: {
            type: Boolean,
            default: void 0
          },
          clsPrefix: {
            type: String,
            required: true
          },
          onClick: Function,
          onMousedown: Function,
          onMouseup: Function
        },
        setup(props) {
          useStyle("-base-icon", style$d, vue.toRef(props, "clsPrefix"));
        },
        render() {
          return vue.h("i", {
            class: `${this.clsPrefix}-base-icon`,
            onClick: this.onClick,
            onMousedown: this.onMousedown,
            onMouseup: this.onMouseup,
            role: this.role,
            "aria-label": this.ariaLabel,
            "aria-hidden": this.ariaHidden,
            "aria-disabled": this.ariaDisabled
          }, this.$slots);
        }
      });
      const style$c = cB("base-close", `
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 background-color: transparent;
 color: var(--n-close-icon-color);
 border-radius: var(--n-close-border-radius);
 height: var(--n-close-size);
 width: var(--n-close-size);
 font-size: var(--n-close-icon-size);
 outline: none;
 border: none;
 position: relative;
 padding: 0;
`, [cM("absolute", `
 height: var(--n-close-icon-size);
 width: var(--n-close-icon-size);
 `), c("&::before", `
 content: "";
 position: absolute;
 width: var(--n-close-size);
 height: var(--n-close-size);
 left: 50%;
 top: 50%;
 transform: translateY(-50%) translateX(-50%);
 transition: inherit;
 border-radius: inherit;
 `), cNotM("disabled", [c("&:hover", `
 color: var(--n-close-icon-color-hover);
 `), c("&:hover::before", `
 background-color: var(--n-close-color-hover);
 `), c("&:focus::before", `
 background-color: var(--n-close-color-hover);
 `), c("&:active", `
 color: var(--n-close-icon-color-pressed);
 `), c("&:active::before", `
 background-color: var(--n-close-color-pressed);
 `)]), cM("disabled", `
 cursor: not-allowed;
 color: var(--n-close-icon-color-disabled);
 background-color: transparent;
 `), cM("round", [c("&::before", `
 border-radius: 50%;
 `)])]);
      const NBaseClose = vue.defineComponent({
        name: "BaseClose",
        props: {
          isButtonTag: {
            type: Boolean,
            default: true
          },
          clsPrefix: {
            type: String,
            required: true
          },
          disabled: {
            type: Boolean,
            default: void 0
          },
          focusable: {
            type: Boolean,
            default: true
          },
          round: Boolean,
          onClick: Function,
          absolute: Boolean
        },
        setup(props) {
          useStyle("-base-close", style$c, vue.toRef(props, "clsPrefix"));
          return () => {
            const {
              clsPrefix,
              disabled,
              absolute,
              round,
              isButtonTag
            } = props;
            const Tag = isButtonTag ? "button" : "div";
            return vue.h(Tag, {
              type: isButtonTag ? "button" : void 0,
              tabindex: disabled || !props.focusable ? -1 : 0,
              "aria-disabled": disabled,
              "aria-label": "close",
              role: isButtonTag ? void 0 : "button",
              disabled,
              class: [`${clsPrefix}-base-close`, absolute && `${clsPrefix}-base-close--absolute`, disabled && `${clsPrefix}-base-close--disabled`, round && `${clsPrefix}-base-close--round`],
              onMousedown: (e) => {
                if (!props.focusable) {
                  e.preventDefault();
                }
              },
              onClick: props.onClick
            }, vue.h(NBaseIcon, {
              clsPrefix
            }, {
              default: () => vue.h(ErrorIcon$1, null)
            }));
          };
        }
      });
      const {
        cubicBezierEaseInOut: cubicBezierEaseInOut$3
      } = commonVariables$3;
      function iconSwitchTransition({
        originalTransform = "",
        left = 0,
        top = 0,
        transition = `all .3s ${cubicBezierEaseInOut$3} !important`
      } = {}) {
        return [c("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to", {
          transform: originalTransform + " scale(0.75)",
          left,
          top,
          opacity: 0
        }), c("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from", {
          transform: `scale(1) ${originalTransform}`,
          left,
          top,
          opacity: 1
        }), c("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active", {
          transformOrigin: "center",
          position: "absolute",
          left,
          top,
          transition
        })];
      }
      const style$b = c([c("@keyframes rotator", `
 0% {
 -webkit-transform: rotate(0deg);
 transform: rotate(0deg);
 }
 100% {
 -webkit-transform: rotate(360deg);
 transform: rotate(360deg);
 }`), cB("base-loading", `
 position: relative;
 line-height: 0;
 width: 1em;
 height: 1em;
 `, [cE("transition-wrapper", `
 position: absolute;
 width: 100%;
 height: 100%;
 `, [iconSwitchTransition()]), cE("placeholder", `
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateX(-50%) translateY(-50%);
 `, [iconSwitchTransition({
        left: "50%",
        top: "50%",
        originalTransform: "translateX(-50%) translateY(-50%)"
      })]), cE("container", `
 animation: rotator 3s linear infinite both;
 `, [cE("icon", `
 height: 1em;
 width: 1em;
 `)])])]);
      const duration = "1.6s";
      const exposedLoadingProps = {
        strokeWidth: {
          type: Number,
          default: 28
        },
        stroke: {
          type: String,
          default: void 0
        }
      };
      const NBaseLoading = vue.defineComponent({
        name: "BaseLoading",
        props: Object.assign({
          clsPrefix: {
            type: String,
            required: true
          },
          show: {
            type: Boolean,
            default: true
          },
          scale: {
            type: Number,
            default: 1
          },
          radius: {
            type: Number,
            default: 100
          }
        }, exposedLoadingProps),
        setup(props) {
          useStyle("-base-loading", style$b, vue.toRef(props, "clsPrefix"));
        },
        render() {
          const {
            clsPrefix,
            radius,
            strokeWidth,
            stroke,
            scale
          } = this;
          const scaledRadius = radius / scale;
          return vue.h("div", {
            class: `${clsPrefix}-base-loading`,
            role: "img",
            "aria-label": "loading"
          }, vue.h(NIconSwitchTransition, null, {
            default: () => this.show ? vue.h("div", {
              key: "icon",
              class: `${clsPrefix}-base-loading__transition-wrapper`
            }, vue.h("div", {
              class: `${clsPrefix}-base-loading__container`
            }, vue.h("svg", {
              class: `${clsPrefix}-base-loading__icon`,
              viewBox: `0 0 ${2 * scaledRadius} ${2 * scaledRadius}`,
              xmlns: "http://www.w3.org/2000/svg",
              style: {
                color: stroke
              }
            }, vue.h("g", null, vue.h("animateTransform", {
              attributeName: "transform",
              type: "rotate",
              values: `0 ${scaledRadius} ${scaledRadius};270 ${scaledRadius} ${scaledRadius}`,
              begin: "0s",
              dur: duration,
              fill: "freeze",
              repeatCount: "indefinite"
            }), vue.h("circle", {
              class: `${clsPrefix}-base-loading__icon`,
              fill: "none",
              stroke: "currentColor",
              "stroke-width": strokeWidth,
              "stroke-linecap": "round",
              cx: scaledRadius,
              cy: scaledRadius,
              r: radius - strokeWidth / 2,
              "stroke-dasharray": 5.67 * radius,
              "stroke-dashoffset": 18.48 * radius
            }, vue.h("animateTransform", {
              attributeName: "transform",
              type: "rotate",
              values: `0 ${scaledRadius} ${scaledRadius};135 ${scaledRadius} ${scaledRadius};450 ${scaledRadius} ${scaledRadius}`,
              begin: "0s",
              dur: duration,
              fill: "freeze",
              repeatCount: "indefinite"
            }), vue.h("animate", {
              attributeName: "stroke-dashoffset",
              values: `${5.67 * radius};${1.42 * radius};${5.67 * radius}`,
              begin: "0s",
              dur: duration,
              fill: "freeze",
              repeatCount: "indefinite"
            })))))) : vue.h("div", {
              key: "placeholder",
              class: `${clsPrefix}-base-loading__placeholder`
            }, this.$slots)
          }));
        }
      });
      const base = {
        neutralBase: "#FFF",
        neutralInvertBase: "#000",
        neutralTextBase: "#000",
        neutralPopover: "#fff",
        neutralCard: "#fff",
        neutralModal: "#fff",
        neutralBody: "#fff",
        alpha1: "0.82",
        alpha2: "0.72",
        alpha3: "0.38",
        alpha4: "0.24",
        // disabled text, placeholder, icon
        alpha5: "0.18",
        // disabled placeholder
        alphaClose: "0.6",
        alphaDisabled: "0.5",
        alphaDisabledInput: "0.02",
        alphaPending: "0.05",
        alphaTablePending: "0.02",
        alphaPressed: "0.07",
        alphaAvatar: "0.2",
        alphaRail: "0.14",
        alphaProgressRail: ".08",
        alphaBorder: "0.12",
        alphaDivider: "0.06",
        alphaInput: "0",
        alphaAction: "0.02",
        alphaTab: "0.04",
        alphaScrollbar: "0.25",
        alphaScrollbarHover: "0.4",
        alphaCode: "0.05",
        alphaTag: "0.02",
        // primary
        primaryHover: "#36ad6a",
        primaryDefault: "#18a058",
        primaryActive: "#0c7a43",
        primarySuppl: "#36ad6a",
        // info
        infoHover: "#4098fc",
        infoDefault: "#2080f0",
        infoActive: "#1060c9",
        infoSuppl: "#4098fc",
        // error
        errorHover: "#de576d",
        errorDefault: "#d03050",
        errorActive: "#ab1f3f",
        errorSuppl: "#de576d",
        // warning
        warningHover: "#fcb040",
        warningDefault: "#f0a020",
        warningActive: "#c97c10",
        warningSuppl: "#fcb040",
        // success
        successHover: "#36ad6a",
        successDefault: "#18a058",
        successActive: "#0c7a43",
        successSuppl: "#36ad6a"
      };
      const baseBackgroundRgb = rgba(base.neutralBase);
      const baseInvertBackgroundRgb = rgba(base.neutralInvertBase);
      const overlayPrefix = "rgba(" + baseInvertBackgroundRgb.slice(0, 3).join(", ") + ", ";
      function overlay(alpha) {
        return overlayPrefix + String(alpha) + ")";
      }
      function neutral(alpha) {
        const overlayRgba = Array.from(baseInvertBackgroundRgb);
        overlayRgba[3] = Number(alpha);
        return composite(baseBackgroundRgb, overlayRgba);
      }
      const derived = Object.assign(Object.assign({
        name: "common"
      }, commonVariables$3), {
        baseColor: base.neutralBase,
        // primary color
        primaryColor: base.primaryDefault,
        primaryColorHover: base.primaryHover,
        primaryColorPressed: base.primaryActive,
        primaryColorSuppl: base.primarySuppl,
        // info color
        infoColor: base.infoDefault,
        infoColorHover: base.infoHover,
        infoColorPressed: base.infoActive,
        infoColorSuppl: base.infoSuppl,
        // success color
        successColor: base.successDefault,
        successColorHover: base.successHover,
        successColorPressed: base.successActive,
        successColorSuppl: base.successSuppl,
        // warning color
        warningColor: base.warningDefault,
        warningColorHover: base.warningHover,
        warningColorPressed: base.warningActive,
        warningColorSuppl: base.warningSuppl,
        // error color
        errorColor: base.errorDefault,
        errorColorHover: base.errorHover,
        errorColorPressed: base.errorActive,
        errorColorSuppl: base.errorSuppl,
        // text color
        textColorBase: base.neutralTextBase,
        textColor1: "rgb(31, 34, 37)",
        textColor2: "rgb(51, 54, 57)",
        textColor3: "rgb(118, 124, 130)",
        // textColor4: neutral(base.alpha4), // disabled, placeholder, icon
        // textColor5: neutral(base.alpha5),
        textColorDisabled: neutral(base.alpha4),
        placeholderColor: neutral(base.alpha4),
        placeholderColorDisabled: neutral(base.alpha5),
        iconColor: neutral(base.alpha4),
        iconColorHover: scaleColor(neutral(base.alpha4), {
          lightness: 0.75
        }),
        iconColorPressed: scaleColor(neutral(base.alpha4), {
          lightness: 0.9
        }),
        iconColorDisabled: neutral(base.alpha5),
        opacity1: base.alpha1,
        opacity2: base.alpha2,
        opacity3: base.alpha3,
        opacity4: base.alpha4,
        opacity5: base.alpha5,
        dividerColor: "rgb(239, 239, 245)",
        borderColor: "rgb(224, 224, 230)",
        // close
        closeIconColor: neutral(Number(base.alphaClose)),
        closeIconColorHover: neutral(Number(base.alphaClose)),
        closeIconColorPressed: neutral(Number(base.alphaClose)),
        closeColorHover: "rgba(0, 0, 0, .09)",
        closeColorPressed: "rgba(0, 0, 0, .13)",
        // clear
        clearColor: neutral(base.alpha4),
        clearColorHover: scaleColor(neutral(base.alpha4), {
          lightness: 0.75
        }),
        clearColorPressed: scaleColor(neutral(base.alpha4), {
          lightness: 0.9
        }),
        scrollbarColor: overlay(base.alphaScrollbar),
        scrollbarColorHover: overlay(base.alphaScrollbarHover),
        scrollbarWidth: "5px",
        scrollbarHeight: "5px",
        scrollbarBorderRadius: "5px",
        progressRailColor: neutral(base.alphaProgressRail),
        railColor: "rgb(219, 219, 223)",
        popoverColor: base.neutralPopover,
        tableColor: base.neutralCard,
        cardColor: base.neutralCard,
        modalColor: base.neutralModal,
        bodyColor: base.neutralBody,
        tagColor: "#eee",
        avatarColor: neutral(base.alphaAvatar),
        invertedColor: "rgb(0, 20, 40)",
        inputColor: neutral(base.alphaInput),
        codeColor: "rgb(244, 244, 248)",
        tabColor: "rgb(247, 247, 250)",
        actionColor: "rgb(250, 250, 252)",
        tableHeaderColor: "rgb(250, 250, 252)",
        hoverColor: "rgb(243, 243, 245)",
        // use color with alpha since it can be nested with header filter & sorter effect
        tableColorHover: "rgba(0, 0, 100, 0.03)",
        tableColorStriped: "rgba(0, 0, 100, 0.02)",
        pressedColor: "rgb(237, 237, 239)",
        opacityDisabled: base.alphaDisabled,
        inputColorDisabled: "rgb(250, 250, 252)",
        // secondary button color
        // can also be used in tertiary button & quaternary button
        buttonColor2: "rgba(46, 51, 56, .05)",
        buttonColor2Hover: "rgba(46, 51, 56, .09)",
        buttonColor2Pressed: "rgba(46, 51, 56, .13)",
        boxShadow1: "0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",
        boxShadow2: "0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",
        boxShadow3: "0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"
      });
      const commonLight = derived;
      const self$b = (vars) => {
        const {
          scrollbarColor,
          scrollbarColorHover
        } = vars;
        return {
          color: scrollbarColor,
          colorHover: scrollbarColorHover
        };
      };
      const scrollbarLight = {
        name: "Scrollbar",
        common: commonLight,
        self: self$b
      };
      const scrollbarLight$1 = scrollbarLight;
      const {
        cubicBezierEaseInOut: cubicBezierEaseInOut$2
      } = commonVariables$3;
      function fadeInTransition({
        name = "fade-in",
        enterDuration = "0.2s",
        leaveDuration = "0.2s",
        enterCubicBezier = cubicBezierEaseInOut$2,
        leaveCubicBezier = cubicBezierEaseInOut$2
      } = {}) {
        return [c(`&.${name}-transition-enter-active`, {
          transition: `all ${enterDuration} ${enterCubicBezier}!important`
        }), c(`&.${name}-transition-leave-active`, {
          transition: `all ${leaveDuration} ${leaveCubicBezier}!important`
        }), c(`&.${name}-transition-enter-from, &.${name}-transition-leave-to`, {
          opacity: 0
        }), c(`&.${name}-transition-leave-from, &.${name}-transition-enter-to`, {
          opacity: 1
        })];
      }
      const style$a = cB("scrollbar", `
 overflow: hidden;
 position: relative;
 z-index: auto;
 height: 100%;
 width: 100%;
`, [c(">", [cB("scrollbar-container", `
 width: 100%;
 overflow: scroll;
 height: 100%;
 min-height: inherit;
 max-height: inherit;
 scrollbar-width: none;
 `, [c("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb", `
 width: 0;
 height: 0;
 display: none;
 `), c(">", [cB("scrollbar-content", `
 box-sizing: border-box;
 min-width: 100%;
 `)])])]), c(">, +", [cB("scrollbar-rail", `
 position: absolute;
 pointer-events: none;
 user-select: none;
 -webkit-user-select: none;
 `, [cM("horizontal", `
 left: 2px;
 right: 2px;
 bottom: 4px;
 height: var(--n-scrollbar-height);
 `, [c(">", [cE("scrollbar", `
 height: var(--n-scrollbar-height);
 border-radius: var(--n-scrollbar-border-radius);
 right: 0;
 `)])]), cM("vertical", `
 right: 4px;
 top: 2px;
 bottom: 2px;
 width: var(--n-scrollbar-width);
 `, [c(">", [cE("scrollbar", `
 width: var(--n-scrollbar-width);
 border-radius: var(--n-scrollbar-border-radius);
 bottom: 0;
 `)])]), cM("disabled", [c(">", [cE("scrollbar", "pointer-events: none;")])]), c(">", [cE("scrollbar", `
 z-index: 1;
 position: absolute;
 cursor: pointer;
 pointer-events: all;
 background-color: var(--n-scrollbar-color);
 transition: background-color .2s var(--n-scrollbar-bezier);
 `, [fadeInTransition(), c("&:hover", "background-color: var(--n-scrollbar-color-hover);")])])])])]);
      const scrollbarProps = Object.assign(Object.assign({}, useTheme.props), {
        size: {
          type: Number,
          default: 5
        },
        duration: {
          type: Number,
          default: 0
        },
        scrollable: {
          type: Boolean,
          default: true
        },
        xScrollable: Boolean,
        trigger: {
          type: String,
          default: "hover"
        },
        useUnifiedContainer: Boolean,
        triggerDisplayManually: Boolean,
        // If container is set, resize observer won't not attached
        container: Function,
        content: Function,
        containerClass: String,
        containerStyle: [String, Object],
        contentClass: [String, Array],
        contentStyle: [String, Object],
        horizontalRailStyle: [String, Object],
        verticalRailStyle: [String, Object],
        onScroll: Function,
        onWheel: Function,
        onResize: Function,
        internalOnUpdateScrollLeft: Function,
        internalHoistYRail: Boolean
      });
      const Scrollbar = vue.defineComponent({
        name: "Scrollbar",
        props: scrollbarProps,
        inheritAttrs: false,
        setup(props) {
          const {
            mergedClsPrefixRef,
            inlineThemeDisabled,
            mergedRtlRef
          } = useConfig(props);
          const rtlEnabledRef = useRtl("Scrollbar", mergedRtlRef, mergedClsPrefixRef);
          const wrapperRef = vue.ref(null);
          const containerRef = vue.ref(null);
          const contentRef = vue.ref(null);
          const yRailRef = vue.ref(null);
          const xRailRef = vue.ref(null);
          const contentHeightRef = vue.ref(null);
          const contentWidthRef = vue.ref(null);
          const containerHeightRef = vue.ref(null);
          const containerWidthRef = vue.ref(null);
          const yRailSizeRef = vue.ref(null);
          const xRailSizeRef = vue.ref(null);
          const containerScrollTopRef = vue.ref(0);
          const containerScrollLeftRef = vue.ref(0);
          const isShowXBarRef = vue.ref(false);
          const isShowYBarRef = vue.ref(false);
          let yBarPressed = false;
          let xBarPressed = false;
          let xBarVanishTimerId;
          let yBarVanishTimerId;
          let memoYTop = 0;
          let memoXLeft = 0;
          let memoMouseX = 0;
          let memoMouseY = 0;
          const isIos2 = useIsIos();
          const yBarSizeRef = vue.computed(() => {
            const {
              value: containerHeight
            } = containerHeightRef;
            const {
              value: contentHeight
            } = contentHeightRef;
            const {
              value: yRailSize
            } = yRailSizeRef;
            if (containerHeight === null || contentHeight === null || yRailSize === null) {
              return 0;
            } else {
              return Math.min(containerHeight, yRailSize * containerHeight / contentHeight + props.size * 1.5);
            }
          });
          const yBarSizePxRef = vue.computed(() => {
            return `${yBarSizeRef.value}px`;
          });
          const xBarSizeRef = vue.computed(() => {
            const {
              value: containerWidth
            } = containerWidthRef;
            const {
              value: contentWidth
            } = contentWidthRef;
            const {
              value: xRailSize
            } = xRailSizeRef;
            if (containerWidth === null || contentWidth === null || xRailSize === null) {
              return 0;
            } else {
              return xRailSize * containerWidth / contentWidth + props.size * 1.5;
            }
          });
          const xBarSizePxRef = vue.computed(() => {
            return `${xBarSizeRef.value}px`;
          });
          const yBarTopRef = vue.computed(() => {
            const {
              value: containerHeight
            } = containerHeightRef;
            const {
              value: containerScrollTop
            } = containerScrollTopRef;
            const {
              value: contentHeight
            } = contentHeightRef;
            const {
              value: yRailSize
            } = yRailSizeRef;
            if (containerHeight === null || contentHeight === null || yRailSize === null) {
              return 0;
            } else {
              const heightDiff = contentHeight - containerHeight;
              if (!heightDiff)
                return 0;
              return containerScrollTop / heightDiff * (yRailSize - yBarSizeRef.value);
            }
          });
          const yBarTopPxRef = vue.computed(() => {
            return `${yBarTopRef.value}px`;
          });
          const xBarLeftRef = vue.computed(() => {
            const {
              value: containerWidth
            } = containerWidthRef;
            const {
              value: containerScrollLeft
            } = containerScrollLeftRef;
            const {
              value: contentWidth
            } = contentWidthRef;
            const {
              value: xRailSize
            } = xRailSizeRef;
            if (containerWidth === null || contentWidth === null || xRailSize === null) {
              return 0;
            } else {
              const widthDiff = contentWidth - containerWidth;
              if (!widthDiff)
                return 0;
              return containerScrollLeft / widthDiff * (xRailSize - xBarSizeRef.value);
            }
          });
          const xBarLeftPxRef = vue.computed(() => {
            return `${xBarLeftRef.value}px`;
          });
          const needYBarRef = vue.computed(() => {
            const {
              value: containerHeight
            } = containerHeightRef;
            const {
              value: contentHeight
            } = contentHeightRef;
            return containerHeight !== null && contentHeight !== null && contentHeight > containerHeight;
          });
          const needXBarRef = vue.computed(() => {
            const {
              value: containerWidth
            } = containerWidthRef;
            const {
              value: contentWidth
            } = contentWidthRef;
            return containerWidth !== null && contentWidth !== null && contentWidth > containerWidth;
          });
          const mergedShowXBarRef = vue.computed(() => {
            const {
              trigger: trigger2
            } = props;
            return trigger2 === "none" || isShowXBarRef.value;
          });
          const mergedShowYBarRef = vue.computed(() => {
            const {
              trigger: trigger2
            } = props;
            return trigger2 === "none" || isShowYBarRef.value;
          });
          const mergedContainerRef = vue.computed(() => {
            const {
              container
            } = props;
            if (container)
              return container();
            return containerRef.value;
          });
          const mergedContentRef = vue.computed(() => {
            const {
              content
            } = props;
            if (content)
              return content();
            return contentRef.value;
          });
          const activateState = useReactivated(() => {
            if (!props.container) {
              scrollTo({
                top: containerScrollTopRef.value,
                left: containerScrollLeftRef.value
              });
            }
          });
          const handleContentResize = () => {
            if (activateState.isDeactivated)
              return;
            sync();
          };
          const handleContainerResize = (e) => {
            if (activateState.isDeactivated)
              return;
            const {
              onResize
            } = props;
            if (onResize)
              onResize(e);
            sync();
          };
          const scrollTo = (options, y) => {
            if (!props.scrollable)
              return;
            if (typeof options === "number") {
              scrollToPosition(y !== null && y !== void 0 ? y : 0, options, 0, false, "auto");
              return;
            }
            const {
              left,
              top,
              index,
              elSize,
              position,
              behavior,
              el,
              debounce = true
            } = options;
            if (left !== void 0 || top !== void 0) {
              scrollToPosition(left !== null && left !== void 0 ? left : 0, top !== null && top !== void 0 ? top : 0, 0, false, behavior);
            }
            if (el !== void 0) {
              scrollToPosition(0, el.offsetTop, el.offsetHeight, debounce, behavior);
            } else if (index !== void 0 && elSize !== void 0) {
              scrollToPosition(0, index * elSize, elSize, debounce, behavior);
            } else if (position === "bottom") {
              scrollToPosition(0, Number.MAX_SAFE_INTEGER, 0, false, behavior);
            } else if (position === "top") {
              scrollToPosition(0, 0, 0, false, behavior);
            }
          };
          const scrollBy = (options, y) => {
            if (!props.scrollable)
              return;
            const {
              value: container
            } = mergedContainerRef;
            if (!container)
              return;
            if (typeof options === "object") {
              container.scrollBy(options);
            } else {
              container.scrollBy(options, y || 0);
            }
          };
          function scrollToPosition(left, top, elSize, debounce, behavior) {
            const {
              value: container
            } = mergedContainerRef;
            if (!container)
              return;
            if (debounce) {
              const {
                scrollTop,
                offsetHeight
              } = container;
              if (top > scrollTop) {
                if (top + elSize <= scrollTop + offsetHeight)
                  ;
                else {
                  container.scrollTo({
                    left,
                    top: top + elSize - offsetHeight,
                    behavior
                  });
                }
                return;
              }
            }
            container.scrollTo({
              left,
              top,
              behavior
            });
          }
          function handleMouseEnterWrapper() {
            showXBar();
            showYBar();
            sync();
          }
          function handleMouseLeaveWrapper() {
            hideBar();
          }
          function hideBar() {
            hideYBar();
            hideXBar();
          }
          function hideYBar() {
            if (yBarVanishTimerId !== void 0) {
              window.clearTimeout(yBarVanishTimerId);
            }
            yBarVanishTimerId = window.setTimeout(() => {
              isShowYBarRef.value = false;
            }, props.duration);
          }
          function hideXBar() {
            if (xBarVanishTimerId !== void 0) {
              window.clearTimeout(xBarVanishTimerId);
            }
            xBarVanishTimerId = window.setTimeout(() => {
              isShowXBarRef.value = false;
            }, props.duration);
          }
          function showXBar() {
            if (xBarVanishTimerId !== void 0) {
              window.clearTimeout(xBarVanishTimerId);
            }
            isShowXBarRef.value = true;
          }
          function showYBar() {
            if (yBarVanishTimerId !== void 0) {
              window.clearTimeout(yBarVanishTimerId);
            }
            isShowYBarRef.value = true;
          }
          function handleScroll(e) {
            const {
              onScroll
            } = props;
            if (onScroll)
              onScroll(e);
            syncScrollState();
          }
          function syncScrollState() {
            const {
              value: container
            } = mergedContainerRef;
            if (container) {
              containerScrollTopRef.value = container.scrollTop;
              containerScrollLeftRef.value = container.scrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);
            }
          }
          function syncPositionState() {
            const {
              value: content
            } = mergedContentRef;
            if (content) {
              contentHeightRef.value = content.offsetHeight;
              contentWidthRef.value = content.offsetWidth;
            }
            const {
              value: container
            } = mergedContainerRef;
            if (container) {
              containerHeightRef.value = container.offsetHeight;
              containerWidthRef.value = container.offsetWidth;
            }
            const {
              value: xRailEl
            } = xRailRef;
            const {
              value: yRailEl
            } = yRailRef;
            if (xRailEl) {
              xRailSizeRef.value = xRailEl.offsetWidth;
            }
            if (yRailEl) {
              yRailSizeRef.value = yRailEl.offsetHeight;
            }
          }
          function syncUnifiedContainer() {
            const {
              value: container
            } = mergedContainerRef;
            if (container) {
              containerScrollTopRef.value = container.scrollTop;
              containerScrollLeftRef.value = container.scrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);
              containerHeightRef.value = container.offsetHeight;
              containerWidthRef.value = container.offsetWidth;
              contentHeightRef.value = container.scrollHeight;
              contentWidthRef.value = container.scrollWidth;
            }
            const {
              value: xRailEl
            } = xRailRef;
            const {
              value: yRailEl
            } = yRailRef;
            if (xRailEl) {
              xRailSizeRef.value = xRailEl.offsetWidth;
            }
            if (yRailEl) {
              yRailSizeRef.value = yRailEl.offsetHeight;
            }
          }
          function sync() {
            if (!props.scrollable)
              return;
            if (props.useUnifiedContainer) {
              syncUnifiedContainer();
            } else {
              syncPositionState();
              syncScrollState();
            }
          }
          function isMouseUpAway(e) {
            var _a;
            return !((_a = wrapperRef.value) === null || _a === void 0 ? void 0 : _a.contains(getPreciseEventTarget(e)));
          }
          function handleXScrollMouseDown(e) {
            e.preventDefault();
            e.stopPropagation();
            xBarPressed = true;
            on("mousemove", window, handleXScrollMouseMove, true);
            on("mouseup", window, handleXScrollMouseUp, true);
            memoXLeft = containerScrollLeftRef.value;
            memoMouseX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? window.innerWidth - e.clientX : e.clientX;
          }
          function handleXScrollMouseMove(e) {
            if (!xBarPressed)
              return;
            if (xBarVanishTimerId !== void 0) {
              window.clearTimeout(xBarVanishTimerId);
            }
            if (yBarVanishTimerId !== void 0) {
              window.clearTimeout(yBarVanishTimerId);
            }
            const {
              value: containerWidth
            } = containerWidthRef;
            const {
              value: contentWidth
            } = contentWidthRef;
            const {
              value: xBarSize
            } = xBarSizeRef;
            if (containerWidth === null || contentWidth === null)
              return;
            const dX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? window.innerWidth - e.clientX - memoMouseX : e.clientX - memoMouseX;
            const dScrollLeft = dX * (contentWidth - containerWidth) / (containerWidth - xBarSize);
            const toScrollLeftUpperBound = contentWidth - containerWidth;
            let toScrollLeft = memoXLeft + dScrollLeft;
            toScrollLeft = Math.min(toScrollLeftUpperBound, toScrollLeft);
            toScrollLeft = Math.max(toScrollLeft, 0);
            const {
              value: container
            } = mergedContainerRef;
            if (container) {
              container.scrollLeft = toScrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);
              const {
                internalOnUpdateScrollLeft
              } = props;
              if (internalOnUpdateScrollLeft)
                internalOnUpdateScrollLeft(toScrollLeft);
            }
          }
          function handleXScrollMouseUp(e) {
            e.preventDefault();
            e.stopPropagation();
            off("mousemove", window, handleXScrollMouseMove, true);
            off("mouseup", window, handleXScrollMouseUp, true);
            xBarPressed = false;
            sync();
            if (isMouseUpAway(e)) {
              hideBar();
            }
          }
          function handleYScrollMouseDown(e) {
            e.preventDefault();
            e.stopPropagation();
            yBarPressed = true;
            on("mousemove", window, handleYScrollMouseMove, true);
            on("mouseup", window, handleYScrollMouseUp, true);
            memoYTop = containerScrollTopRef.value;
            memoMouseY = e.clientY;
          }
          function handleYScrollMouseMove(e) {
            if (!yBarPressed)
              return;
            if (xBarVanishTimerId !== void 0) {
              window.clearTimeout(xBarVanishTimerId);
            }
            if (yBarVanishTimerId !== void 0) {
              window.clearTimeout(yBarVanishTimerId);
            }
            const {
              value: containerHeight
            } = containerHeightRef;
            const {
              value: contentHeight
            } = contentHeightRef;
            const {
              value: yBarSize
            } = yBarSizeRef;
            if (containerHeight === null || contentHeight === null)
              return;
            const dY = e.clientY - memoMouseY;
            const dScrollTop = dY * (contentHeight - containerHeight) / (containerHeight - yBarSize);
            const toScrollTopUpperBound = contentHeight - containerHeight;
            let toScrollTop = memoYTop + dScrollTop;
            toScrollTop = Math.min(toScrollTopUpperBound, toScrollTop);
            toScrollTop = Math.max(toScrollTop, 0);
            const {
              value: container
            } = mergedContainerRef;
            if (container) {
              container.scrollTop = toScrollTop;
            }
          }
          function handleYScrollMouseUp(e) {
            e.preventDefault();
            e.stopPropagation();
            off("mousemove", window, handleYScrollMouseMove, true);
            off("mouseup", window, handleYScrollMouseUp, true);
            yBarPressed = false;
            sync();
            if (isMouseUpAway(e)) {
              hideBar();
            }
          }
          vue.watchEffect(() => {
            const {
              value: needXBar
            } = needXBarRef;
            const {
              value: needYBar
            } = needYBarRef;
            const {
              value: mergedClsPrefix
            } = mergedClsPrefixRef;
            const {
              value: xRailEl
            } = xRailRef;
            const {
              value: yRailEl
            } = yRailRef;
            if (xRailEl) {
              if (!needXBar) {
                xRailEl.classList.add(`${mergedClsPrefix}-scrollbar-rail--disabled`);
              } else {
                xRailEl.classList.remove(`${mergedClsPrefix}-scrollbar-rail--disabled`);
              }
            }
            if (yRailEl) {
              if (!needYBar) {
                yRailEl.classList.add(`${mergedClsPrefix}-scrollbar-rail--disabled`);
              } else {
                yRailEl.classList.remove(`${mergedClsPrefix}-scrollbar-rail--disabled`);
              }
            }
          });
          vue.onMounted(() => {
            if (props.container)
              return;
            sync();
          });
          vue.onBeforeUnmount(() => {
            if (xBarVanishTimerId !== void 0) {
              window.clearTimeout(xBarVanishTimerId);
            }
            if (yBarVanishTimerId !== void 0) {
              window.clearTimeout(yBarVanishTimerId);
            }
            off("mousemove", window, handleYScrollMouseMove, true);
            off("mouseup", window, handleYScrollMouseUp, true);
          });
          const themeRef = useTheme("Scrollbar", "-scrollbar", style$a, scrollbarLight$1, props, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              common: {
                cubicBezierEaseInOut: cubicBezierEaseInOut2,
                scrollbarBorderRadius,
                scrollbarHeight,
                scrollbarWidth
              },
              self: {
                color,
                colorHover
              }
            } = themeRef.value;
            return {
              "--n-scrollbar-bezier": cubicBezierEaseInOut2,
              "--n-scrollbar-color": color,
              "--n-scrollbar-color-hover": colorHover,
              "--n-scrollbar-border-radius": scrollbarBorderRadius,
              "--n-scrollbar-width": scrollbarWidth,
              "--n-scrollbar-height": scrollbarHeight
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("scrollbar", void 0, cssVarsRef, props) : void 0;
          const exposedMethods = {
            scrollTo,
            scrollBy,
            sync,
            syncUnifiedContainer,
            handleMouseEnterWrapper,
            handleMouseLeaveWrapper
          };
          return Object.assign(Object.assign({}, exposedMethods), {
            mergedClsPrefix: mergedClsPrefixRef,
            rtlEnabled: rtlEnabledRef,
            containerScrollTop: containerScrollTopRef,
            wrapperRef,
            containerRef,
            contentRef,
            yRailRef,
            xRailRef,
            needYBar: needYBarRef,
            needXBar: needXBarRef,
            yBarSizePx: yBarSizePxRef,
            xBarSizePx: xBarSizePxRef,
            yBarTopPx: yBarTopPxRef,
            xBarLeftPx: xBarLeftPxRef,
            isShowXBar: mergedShowXBarRef,
            isShowYBar: mergedShowYBarRef,
            isIos: isIos2,
            handleScroll,
            handleContentResize,
            handleContainerResize,
            handleYScrollMouseDown,
            handleXScrollMouseDown,
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          });
        },
        render() {
          var _a;
          const {
            $slots,
            mergedClsPrefix,
            triggerDisplayManually,
            rtlEnabled,
            internalHoistYRail
          } = this;
          if (!this.scrollable)
            return (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots);
          const triggerIsNone = this.trigger === "none";
          const createYRail = (className, style2) => {
            return vue.h("div", {
              ref: "yRailRef",
              class: [`${mergedClsPrefix}-scrollbar-rail`, `${mergedClsPrefix}-scrollbar-rail--vertical`, className],
              "data-scrollbar-rail": true,
              style: [style2 || "", this.verticalRailStyle],
              "aria-hiddens": true
            }, vue.h(
              // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
              triggerIsNone ? Wrapper : vue.Transition,
              triggerIsNone ? null : {
                name: "fade-in-transition"
              },
              {
                default: () => this.needYBar && this.isShowYBar && !this.isIos ? vue.h("div", {
                  class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`,
                  style: {
                    height: this.yBarSizePx,
                    top: this.yBarTopPx
                  },
                  onMousedown: this.handleYScrollMouseDown
                }) : null
              }
            ));
          };
          const createChildren = () => {
            var _a2, _b;
            (_a2 = this.onRender) === null || _a2 === void 0 ? void 0 : _a2.call(this);
            return vue.h("div", vue.mergeProps(this.$attrs, {
              role: "none",
              ref: "wrapperRef",
              class: [`${mergedClsPrefix}-scrollbar`, this.themeClass, rtlEnabled && `${mergedClsPrefix}-scrollbar--rtl`],
              style: this.cssVars,
              onMouseenter: triggerDisplayManually ? void 0 : this.handleMouseEnterWrapper,
              onMouseleave: triggerDisplayManually ? void 0 : this.handleMouseLeaveWrapper
            }), [this.container ? (_b = $slots.default) === null || _b === void 0 ? void 0 : _b.call($slots) : vue.h("div", {
              role: "none",
              ref: "containerRef",
              class: [`${mergedClsPrefix}-scrollbar-container`, this.containerClass],
              style: this.containerStyle,
              onScroll: this.handleScroll,
              onWheel: this.onWheel
            }, vue.h(VResizeObserver, {
              onResize: this.handleContentResize
            }, {
              default: () => vue.h("div", {
                ref: "contentRef",
                role: "none",
                style: [{
                  width: this.xScrollable ? "fit-content" : null
                }, this.contentStyle],
                class: [`${mergedClsPrefix}-scrollbar-content`, this.contentClass]
              }, $slots)
            })), internalHoistYRail ? null : createYRail(void 0, void 0), this.xScrollable && vue.h("div", {
              ref: "xRailRef",
              class: [`${mergedClsPrefix}-scrollbar-rail`, `${mergedClsPrefix}-scrollbar-rail--horizontal`],
              style: this.horizontalRailStyle,
              "data-scrollbar-rail": true,
              "aria-hidden": true
            }, vue.h(
              // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
              triggerIsNone ? Wrapper : vue.Transition,
              triggerIsNone ? null : {
                name: "fade-in-transition"
              },
              {
                default: () => this.needXBar && this.isShowXBar && !this.isIos ? vue.h("div", {
                  class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`,
                  style: {
                    width: this.xBarSizePx,
                    right: rtlEnabled ? this.xBarLeftPx : void 0,
                    left: rtlEnabled ? void 0 : this.xBarLeftPx
                  },
                  onMousedown: this.handleXScrollMouseDown
                }) : null
              }
            ))]);
          };
          const scrollbarNode = this.container ? createChildren() : vue.h(VResizeObserver, {
            onResize: this.handleContainerResize
          }, {
            default: createChildren
          });
          if (internalHoistYRail) {
            return vue.h(vue.Fragment, null, scrollbarNode, createYRail(this.themeClass, this.cssVars));
          } else {
            return scrollbarNode;
          }
        }
      });
      const NScrollbar = Scrollbar;
      const {
        cubicBezierEaseIn: cubicBezierEaseIn$1,
        cubicBezierEaseOut: cubicBezierEaseOut$1
      } = commonVariables$3;
      function fadeInScaleUpTransition({
        transformOrigin = "inherit",
        duration: duration2 = ".2s",
        enterScale = ".9",
        originalTransform = "",
        originalTransition = ""
      } = {}) {
        return [c("&.fade-in-scale-up-transition-leave-active", {
          transformOrigin,
          transition: `opacity ${duration2} ${cubicBezierEaseIn$1}, transform ${duration2} ${cubicBezierEaseIn$1} ${originalTransition && "," + originalTransition}`
        }), c("&.fade-in-scale-up-transition-enter-active", {
          transformOrigin,
          transition: `opacity ${duration2} ${cubicBezierEaseOut$1}, transform ${duration2} ${cubicBezierEaseOut$1} ${originalTransition && "," + originalTransition}`
        }), c("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to", {
          opacity: 0,
          transform: `${originalTransform} scale(${enterScale})`
        }), c("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to", {
          opacity: 1,
          transform: `${originalTransform} scale(1)`
        })];
      }
      const style$9 = cB("base-wave", `
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 border-radius: inherit;
`);
      const NBaseWave = vue.defineComponent({
        name: "BaseWave",
        props: {
          clsPrefix: {
            type: String,
            required: true
          }
        },
        setup(props) {
          useStyle("-base-wave", style$9, vue.toRef(props, "clsPrefix"));
          const selfRef = vue.ref(null);
          const activeRef = vue.ref(false);
          let animationTimerId = null;
          vue.onBeforeUnmount(() => {
            if (animationTimerId !== null) {
              window.clearTimeout(animationTimerId);
            }
          });
          return {
            active: activeRef,
            selfRef,
            play() {
              if (animationTimerId !== null) {
                window.clearTimeout(animationTimerId);
                activeRef.value = false;
                animationTimerId = null;
              }
              void vue.nextTick(() => {
                var _a;
                void ((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight);
                activeRef.value = true;
                animationTimerId = window.setTimeout(() => {
                  activeRef.value = false;
                  animationTimerId = null;
                }, 1e3);
              });
            }
          };
        },
        render() {
          const {
            clsPrefix
          } = this;
          return vue.h("div", {
            ref: "selfRef",
            "aria-hidden": true,
            class: [`${clsPrefix}-base-wave`, this.active && `${clsPrefix}-base-wave--active`]
          });
        }
      });
      const {
        cubicBezierEaseInOut: cubicBezierEaseInOut$1
      } = commonVariables$3;
      function fadeInWidthExpandTransition({
        duration: duration2 = ".2s",
        delay = ".1s"
      } = {}) {
        return [c("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to", {
          opacity: 1
        }), c("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from", `
 opacity: 0!important;
 margin-left: 0!important;
 margin-right: 0!important;
 `), c("&.fade-in-width-expand-transition-leave-active", `
 overflow: hidden;
 transition:
 opacity ${duration2} ${cubicBezierEaseInOut$1},
 max-width ${duration2} ${cubicBezierEaseInOut$1} ${delay},
 margin-left ${duration2} ${cubicBezierEaseInOut$1} ${delay},
 margin-right ${duration2} ${cubicBezierEaseInOut$1} ${delay};
 `), c("&.fade-in-width-expand-transition-enter-active", `
 overflow: hidden;
 transition:
 opacity ${duration2} ${cubicBezierEaseInOut$1} ${delay},
 max-width ${duration2} ${cubicBezierEaseInOut$1},
 margin-left ${duration2} ${cubicBezierEaseInOut$1},
 margin-right ${duration2} ${cubicBezierEaseInOut$1};
 `)];
      }
      const {
        cubicBezierEaseInOut,
        cubicBezierEaseOut,
        cubicBezierEaseIn
      } = commonVariables$3;
      function fadeInHeightExpandTransition({
        overflow = "hidden",
        duration: duration2 = ".3s",
        originalTransition = "",
        leavingDelay = "0s",
        foldPadding = false,
        enterToProps = void 0,
        leaveToProps = void 0,
        reverse = false
      } = {}) {
        const enterClass = reverse ? "leave" : "enter";
        const leaveClass = reverse ? "enter" : "leave";
        return [c(`&.fade-in-height-expand-transition-${leaveClass}-from,
 &.fade-in-height-expand-transition-${enterClass}-to`, Object.assign(Object.assign({}, enterToProps), {
          opacity: 1
        })), c(`&.fade-in-height-expand-transition-${leaveClass}-to,
 &.fade-in-height-expand-transition-${enterClass}-from`, Object.assign(Object.assign({}, leaveToProps), {
          opacity: 0,
          marginTop: "0 !important",
          marginBottom: "0 !important",
          paddingTop: foldPadding ? "0 !important" : void 0,
          paddingBottom: foldPadding ? "0 !important" : void 0
        })), c(`&.fade-in-height-expand-transition-${leaveClass}-active`, `
 overflow: ${overflow};
 transition:
 max-height ${duration2} ${cubicBezierEaseInOut} ${leavingDelay},
 opacity ${duration2} ${cubicBezierEaseOut} ${leavingDelay},
 margin-top ${duration2} ${cubicBezierEaseInOut} ${leavingDelay},
 margin-bottom ${duration2} ${cubicBezierEaseInOut} ${leavingDelay},
 padding-top ${duration2} ${cubicBezierEaseInOut} ${leavingDelay},
 padding-bottom ${duration2} ${cubicBezierEaseInOut} ${leavingDelay}
 ${originalTransition ? "," + originalTransition : ""}
 `), c(`&.fade-in-height-expand-transition-${enterClass}-active`, `
 overflow: ${overflow};
 transition:
 max-height ${duration2} ${cubicBezierEaseInOut},
 opacity ${duration2} ${cubicBezierEaseIn},
 margin-top ${duration2} ${cubicBezierEaseInOut},
 margin-bottom ${duration2} ${cubicBezierEaseInOut},
 padding-top ${duration2} ${cubicBezierEaseInOut},
 padding-bottom ${duration2} ${cubicBezierEaseInOut}
 ${originalTransition ? "," + originalTransition : ""}
 `)];
      }
      const isChrome = isBrowser$2 && "chrome" in window;
      isBrowser$2 && navigator.userAgent.includes("Firefox");
      const isSafari = isBrowser$2 && navigator.userAgent.includes("Safari") && !isChrome;
      function createHoverColor(rgb) {
        return composite(rgb, [255, 255, 255, 0.16]);
      }
      function createPressedColor(rgb) {
        return composite(rgb, [0, 0, 0, 0.12]);
      }
      const buttonGroupInjectionKey = createInjectionKey("n-button-group");
      const commonVariables$2 = {
        paddingTiny: "0 6px",
        paddingSmall: "0 10px",
        paddingMedium: "0 14px",
        paddingLarge: "0 18px",
        paddingRoundTiny: "0 10px",
        paddingRoundSmall: "0 14px",
        paddingRoundMedium: "0 18px",
        paddingRoundLarge: "0 22px",
        iconMarginTiny: "6px",
        iconMarginSmall: "6px",
        iconMarginMedium: "6px",
        iconMarginLarge: "6px",
        iconSizeTiny: "14px",
        iconSizeSmall: "18px",
        iconSizeMedium: "18px",
        iconSizeLarge: "20px",
        rippleDuration: ".6s"
      };
      const self$a = (vars) => {
        const {
          heightTiny,
          heightSmall,
          heightMedium,
          heightLarge,
          borderRadius,
          fontSizeTiny,
          fontSizeSmall,
          fontSizeMedium,
          fontSizeLarge,
          opacityDisabled,
          textColor2,
          textColor3,
          primaryColorHover,
          primaryColorPressed,
          borderColor,
          primaryColor,
          baseColor,
          infoColor,
          infoColorHover,
          infoColorPressed,
          successColor,
          successColorHover,
          successColorPressed,
          warningColor,
          warningColorHover,
          warningColorPressed,
          errorColor,
          errorColorHover,
          errorColorPressed,
          fontWeight,
          buttonColor2,
          buttonColor2Hover,
          buttonColor2Pressed,
          fontWeightStrong
        } = vars;
        return Object.assign(Object.assign({}, commonVariables$2), {
          heightTiny,
          heightSmall,
          heightMedium,
          heightLarge,
          borderRadiusTiny: borderRadius,
          borderRadiusSmall: borderRadius,
          borderRadiusMedium: borderRadius,
          borderRadiusLarge: borderRadius,
          fontSizeTiny,
          fontSizeSmall,
          fontSizeMedium,
          fontSizeLarge,
          opacityDisabled,
          // secondary
          colorOpacitySecondary: "0.16",
          colorOpacitySecondaryHover: "0.22",
          colorOpacitySecondaryPressed: "0.28",
          colorSecondary: buttonColor2,
          colorSecondaryHover: buttonColor2Hover,
          colorSecondaryPressed: buttonColor2Pressed,
          // tertiary
          colorTertiary: buttonColor2,
          colorTertiaryHover: buttonColor2Hover,
          colorTertiaryPressed: buttonColor2Pressed,
          // quaternary
          colorQuaternary: "#0000",
          colorQuaternaryHover: buttonColor2Hover,
          colorQuaternaryPressed: buttonColor2Pressed,
          // default type
          color: "#0000",
          colorHover: "#0000",
          colorPressed: "#0000",
          colorFocus: "#0000",
          colorDisabled: "#0000",
          textColor: textColor2,
          textColorTertiary: textColor3,
          textColorHover: primaryColorHover,
          textColorPressed: primaryColorPressed,
          textColorFocus: primaryColorHover,
          textColorDisabled: textColor2,
          textColorText: textColor2,
          textColorTextHover: primaryColorHover,
          textColorTextPressed: primaryColorPressed,
          textColorTextFocus: primaryColorHover,
          textColorTextDisabled: textColor2,
          textColorGhost: textColor2,
          textColorGhostHover: primaryColorHover,
          textColorGhostPressed: primaryColorPressed,
          textColorGhostFocus: primaryColorHover,
          textColorGhostDisabled: textColor2,
          border: `1px solid ${borderColor}`,
          borderHover: `1px solid ${primaryColorHover}`,
          borderPressed: `1px solid ${primaryColorPressed}`,
          borderFocus: `1px solid ${primaryColorHover}`,
          borderDisabled: `1px solid ${borderColor}`,
          rippleColor: primaryColor,
          // primary
          colorPrimary: primaryColor,
          colorHoverPrimary: primaryColorHover,
          colorPressedPrimary: primaryColorPressed,
          colorFocusPrimary: primaryColorHover,
          colorDisabledPrimary: primaryColor,
          textColorPrimary: baseColor,
          textColorHoverPrimary: baseColor,
          textColorPressedPrimary: baseColor,
          textColorFocusPrimary: baseColor,
          textColorDisabledPrimary: baseColor,
          textColorTextPrimary: primaryColor,
          textColorTextHoverPrimary: primaryColorHover,
          textColorTextPressedPrimary: primaryColorPressed,
          textColorTextFocusPrimary: primaryColorHover,
          textColorTextDisabledPrimary: textColor2,
          textColorGhostPrimary: primaryColor,
          textColorGhostHoverPrimary: primaryColorHover,
          textColorGhostPressedPrimary: primaryColorPressed,
          textColorGhostFocusPrimary: primaryColorHover,
          textColorGhostDisabledPrimary: primaryColor,
          borderPrimary: `1px solid ${primaryColor}`,
          borderHoverPrimary: `1px solid ${primaryColorHover}`,
          borderPressedPrimary: `1px solid ${primaryColorPressed}`,
          borderFocusPrimary: `1px solid ${primaryColorHover}`,
          borderDisabledPrimary: `1px solid ${primaryColor}`,
          rippleColorPrimary: primaryColor,
          // info
          colorInfo: infoColor,
          colorHoverInfo: infoColorHover,
          colorPressedInfo: infoColorPressed,
          colorFocusInfo: infoColorHover,
          colorDisabledInfo: infoColor,
          textColorInfo: baseColor,
          textColorHoverInfo: baseColor,
          textColorPressedInfo: baseColor,
          textColorFocusInfo: baseColor,
          textColorDisabledInfo: baseColor,
          textColorTextInfo: infoColor,
          textColorTextHoverInfo: infoColorHover,
          textColorTextPressedInfo: infoColorPressed,
          textColorTextFocusInfo: infoColorHover,
          textColorTextDisabledInfo: textColor2,
          textColorGhostInfo: infoColor,
          textColorGhostHoverInfo: infoColorHover,
          textColorGhostPressedInfo: infoColorPressed,
          textColorGhostFocusInfo: infoColorHover,
          textColorGhostDisabledInfo: infoColor,
          borderInfo: `1px solid ${infoColor}`,
          borderHoverInfo: `1px solid ${infoColorHover}`,
          borderPressedInfo: `1px solid ${infoColorPressed}`,
          borderFocusInfo: `1px solid ${infoColorHover}`,
          borderDisabledInfo: `1px solid ${infoColor}`,
          rippleColorInfo: infoColor,
          // success
          colorSuccess: successColor,
          colorHoverSuccess: successColorHover,
          colorPressedSuccess: successColorPressed,
          colorFocusSuccess: successColorHover,
          colorDisabledSuccess: successColor,
          textColorSuccess: baseColor,
          textColorHoverSuccess: baseColor,
          textColorPressedSuccess: baseColor,
          textColorFocusSuccess: baseColor,
          textColorDisabledSuccess: baseColor,
          textColorTextSuccess: successColor,
          textColorTextHoverSuccess: successColorHover,
          textColorTextPressedSuccess: successColorPressed,
          textColorTextFocusSuccess: successColorHover,
          textColorTextDisabledSuccess: textColor2,
          textColorGhostSuccess: successColor,
          textColorGhostHoverSuccess: successColorHover,
          textColorGhostPressedSuccess: successColorPressed,
          textColorGhostFocusSuccess: successColorHover,
          textColorGhostDisabledSuccess: successColor,
          borderSuccess: `1px solid ${successColor}`,
          borderHoverSuccess: `1px solid ${successColorHover}`,
          borderPressedSuccess: `1px solid ${successColorPressed}`,
          borderFocusSuccess: `1px solid ${successColorHover}`,
          borderDisabledSuccess: `1px solid ${successColor}`,
          rippleColorSuccess: successColor,
          // warning
          colorWarning: warningColor,
          colorHoverWarning: warningColorHover,
          colorPressedWarning: warningColorPressed,
          colorFocusWarning: warningColorHover,
          colorDisabledWarning: warningColor,
          textColorWarning: baseColor,
          textColorHoverWarning: baseColor,
          textColorPressedWarning: baseColor,
          textColorFocusWarning: baseColor,
          textColorDisabledWarning: baseColor,
          textColorTextWarning: warningColor,
          textColorTextHoverWarning: warningColorHover,
          textColorTextPressedWarning: warningColorPressed,
          textColorTextFocusWarning: warningColorHover,
          textColorTextDisabledWarning: textColor2,
          textColorGhostWarning: warningColor,
          textColorGhostHoverWarning: warningColorHover,
          textColorGhostPressedWarning: warningColorPressed,
          textColorGhostFocusWarning: warningColorHover,
          textColorGhostDisabledWarning: warningColor,
          borderWarning: `1px solid ${warningColor}`,
          borderHoverWarning: `1px solid ${warningColorHover}`,
          borderPressedWarning: `1px solid ${warningColorPressed}`,
          borderFocusWarning: `1px solid ${warningColorHover}`,
          borderDisabledWarning: `1px solid ${warningColor}`,
          rippleColorWarning: warningColor,
          // error
          colorError: errorColor,
          colorHoverError: errorColorHover,
          colorPressedError: errorColorPressed,
          colorFocusError: errorColorHover,
          colorDisabledError: errorColor,
          textColorError: baseColor,
          textColorHoverError: baseColor,
          textColorPressedError: baseColor,
          textColorFocusError: baseColor,
          textColorDisabledError: baseColor,
          textColorTextError: errorColor,
          textColorTextHoverError: errorColorHover,
          textColorTextPressedError: errorColorPressed,
          textColorTextFocusError: errorColorHover,
          textColorTextDisabledError: textColor2,
          textColorGhostError: errorColor,
          textColorGhostHoverError: errorColorHover,
          textColorGhostPressedError: errorColorPressed,
          textColorGhostFocusError: errorColorHover,
          textColorGhostDisabledError: errorColor,
          borderError: `1px solid ${errorColor}`,
          borderHoverError: `1px solid ${errorColorHover}`,
          borderPressedError: `1px solid ${errorColorPressed}`,
          borderFocusError: `1px solid ${errorColorHover}`,
          borderDisabledError: `1px solid ${errorColor}`,
          rippleColorError: errorColor,
          waveOpacity: "0.6",
          fontWeight,
          fontWeightStrong
        });
      };
      const buttonLight = {
        name: "Button",
        common: commonLight,
        self: self$a
      };
      const buttonLight$1 = buttonLight;
      const style$8 = c([cB("button", `
 margin: 0;
 font-weight: var(--n-font-weight);
 line-height: 1;
 font-family: inherit;
 padding: var(--n-padding);
 height: var(--n-height);
 font-size: var(--n-font-size);
 border-radius: var(--n-border-radius);
 color: var(--n-text-color);
 background-color: var(--n-color);
 width: var(--n-width);
 white-space: nowrap;
 outline: none;
 position: relative;
 z-index: auto;
 border: none;
 display: inline-flex;
 flex-wrap: nowrap;
 flex-shrink: 0;
 align-items: center;
 justify-content: center;
 user-select: none;
 -webkit-user-select: none;
 text-align: center;
 cursor: pointer;
 text-decoration: none;
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `, [cM("color", [cE("border", {
        borderColor: "var(--n-border-color)"
      }), cM("disabled", [cE("border", {
        borderColor: "var(--n-border-color-disabled)"
      })]), cNotM("disabled", [c("&:focus", [cE("state-border", {
        borderColor: "var(--n-border-color-focus)"
      })]), c("&:hover", [cE("state-border", {
        borderColor: "var(--n-border-color-hover)"
      })]), c("&:active", [cE("state-border", {
        borderColor: "var(--n-border-color-pressed)"
      })]), cM("pressed", [cE("state-border", {
        borderColor: "var(--n-border-color-pressed)"
      })])])]), cM("disabled", {
        backgroundColor: "var(--n-color-disabled)",
        color: "var(--n-text-color-disabled)"
      }, [cE("border", {
        border: "var(--n-border-disabled)"
      })]), cNotM("disabled", [c("&:focus", {
        backgroundColor: "var(--n-color-focus)",
        color: "var(--n-text-color-focus)"
      }, [cE("state-border", {
        border: "var(--n-border-focus)"
      })]), c("&:hover", {
        backgroundColor: "var(--n-color-hover)",
        color: "var(--n-text-color-hover)"
      }, [cE("state-border", {
        border: "var(--n-border-hover)"
      })]), c("&:active", {
        backgroundColor: "var(--n-color-pressed)",
        color: "var(--n-text-color-pressed)"
      }, [cE("state-border", {
        border: "var(--n-border-pressed)"
      })]), cM("pressed", {
        backgroundColor: "var(--n-color-pressed)",
        color: "var(--n-text-color-pressed)"
      }, [cE("state-border", {
        border: "var(--n-border-pressed)"
      })])]), cM("loading", "cursor: wait;"), cB("base-wave", `
 pointer-events: none;
 top: 0;
 right: 0;
 bottom: 0;
 left: 0;
 animation-iteration-count: 1;
 animation-duration: var(--n-ripple-duration);
 animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);
 `, [cM("active", {
        zIndex: 1,
        animationName: "button-wave-spread, button-wave-opacity"
      })]), isBrowser$2 && "MozBoxSizing" in document.createElement("div").style ? c("&::moz-focus-inner", {
        border: 0
      }) : null, cE("border, state-border", `
 position: absolute;
 left: 0;
 top: 0;
 right: 0;
 bottom: 0;
 border-radius: inherit;
 transition: border-color .3s var(--n-bezier);
 pointer-events: none;
 `), cE("border", {
        border: "var(--n-border)"
      }), cE("state-border", {
        border: "var(--n-border)",
        borderColor: "#0000",
        zIndex: 1
      }), cE("icon", `
 margin: var(--n-icon-margin);
 margin-left: 0;
 height: var(--n-icon-size);
 width: var(--n-icon-size);
 max-width: var(--n-icon-size);
 font-size: var(--n-icon-size);
 position: relative;
 flex-shrink: 0;
 `, [cB("icon-slot", `
 height: var(--n-icon-size);
 width: var(--n-icon-size);
 position: absolute;
 left: 0;
 top: 50%;
 transform: translateY(-50%);
 display: flex;
 align-items: center;
 justify-content: center;
 `, [iconSwitchTransition({
        top: "50%",
        originalTransform: "translateY(-50%)"
      })]), fadeInWidthExpandTransition()]), cE("content", `
 display: flex;
 align-items: center;
 flex-wrap: nowrap;
 min-width: 0;
 `, [c("~", [cE("icon", {
        margin: "var(--n-icon-margin)",
        marginRight: 0
      })])]), cM("block", `
 display: flex;
 width: 100%;
 `), cM("dashed", [cE("border, state-border", {
        borderStyle: "dashed !important"
      })]), cM("disabled", {
        cursor: "not-allowed",
        opacity: "var(--n-opacity-disabled)"
      })]), c("@keyframes button-wave-spread", {
        from: {
          boxShadow: "0 0 0.5px 0 var(--n-ripple-color)"
        },
        to: {
          // don't use exact 5px since chrome will display the animation with glitches
          boxShadow: "0 0 0.5px 4.5px var(--n-ripple-color)"
        }
      }), c("@keyframes button-wave-opacity", {
        from: {
          opacity: "var(--n-wave-opacity)"
        },
        to: {
          opacity: 0
        }
      })]);
      const buttonProps = Object.assign(Object.assign({}, useTheme.props), {
        color: String,
        textColor: String,
        text: Boolean,
        block: Boolean,
        loading: Boolean,
        disabled: Boolean,
        circle: Boolean,
        size: String,
        ghost: Boolean,
        round: Boolean,
        secondary: Boolean,
        tertiary: Boolean,
        quaternary: Boolean,
        strong: Boolean,
        focusable: {
          type: Boolean,
          default: true
        },
        keyboard: {
          type: Boolean,
          default: true
        },
        tag: {
          type: String,
          default: "button"
        },
        type: {
          type: String,
          default: "default"
        },
        dashed: Boolean,
        renderIcon: Function,
        iconPlacement: {
          type: String,
          default: "left"
        },
        attrType: {
          type: String,
          default: "button"
        },
        bordered: {
          type: Boolean,
          default: true
        },
        onClick: [Function, Array],
        nativeFocusBehavior: {
          type: Boolean,
          default: !isSafari
        }
      });
      const Button = vue.defineComponent({
        name: "Button",
        props: buttonProps,
        setup(props) {
          const selfElRef = vue.ref(null);
          const waveElRef = vue.ref(null);
          const enterPressedRef = vue.ref(false);
          const showBorderRef = useMemo(() => {
            return !props.quaternary && !props.tertiary && !props.secondary && !props.text && (!props.color || props.ghost || props.dashed) && props.bordered;
          });
          const NButtonGroup = vue.inject(buttonGroupInjectionKey, {});
          const {
            mergedSizeRef
          } = useFormItem({}, {
            defaultSize: "medium",
            mergedSize: (NFormItem) => {
              const {
                size: size2
              } = props;
              if (size2)
                return size2;
              const {
                size: buttonGroupSize
              } = NButtonGroup;
              if (buttonGroupSize)
                return buttonGroupSize;
              const {
                mergedSize: formItemSize
              } = NFormItem || {};
              if (formItemSize) {
                return formItemSize.value;
              }
              return "medium";
            }
          });
          const mergedFocusableRef = vue.computed(() => {
            return props.focusable && !props.disabled;
          });
          const handleMousedown = (e) => {
            var _a;
            if (!mergedFocusableRef.value) {
              e.preventDefault();
            }
            if (props.nativeFocusBehavior) {
              return;
            }
            e.preventDefault();
            if (props.disabled) {
              return;
            }
            if (mergedFocusableRef.value) {
              (_a = selfElRef.value) === null || _a === void 0 ? void 0 : _a.focus({
                preventScroll: true
              });
            }
          };
          const handleClick2 = (e) => {
            var _a;
            if (!props.disabled && !props.loading) {
              const {
                onClick
              } = props;
              if (onClick)
                call$1(onClick, e);
              if (!props.text) {
                (_a = waveElRef.value) === null || _a === void 0 ? void 0 : _a.play();
              }
            }
          };
          const handleKeyup = (e) => {
            switch (e.key) {
              case "Enter":
                if (!props.keyboard) {
                  return;
                }
                enterPressedRef.value = false;
            }
          };
          const handleKeydown = (e) => {
            switch (e.key) {
              case "Enter":
                if (!props.keyboard || props.loading) {
                  e.preventDefault();
                  return;
                }
                enterPressedRef.value = true;
            }
          };
          const handleBlur = () => {
            enterPressedRef.value = false;
          };
          const {
            inlineThemeDisabled,
            mergedClsPrefixRef,
            mergedRtlRef
          } = useConfig(props);
          const themeRef = useTheme("Button", "-button", style$8, buttonLight$1, props, mergedClsPrefixRef);
          const rtlEnabledRef = useRtl("Button", mergedRtlRef, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const theme = themeRef.value;
            const {
              common: {
                cubicBezierEaseInOut: cubicBezierEaseInOut2,
                cubicBezierEaseOut: cubicBezierEaseOut2
              },
              self: self2
            } = theme;
            const {
              rippleDuration,
              opacityDisabled,
              fontWeight,
              fontWeightStrong
            } = self2;
            const size2 = mergedSizeRef.value;
            const {
              dashed,
              type,
              ghost,
              text,
              color,
              round,
              circle,
              textColor,
              secondary,
              tertiary,
              quaternary,
              strong
            } = props;
            const fontProps = {
              "font-weight": strong ? fontWeightStrong : fontWeight
            };
            let colorProps = {
              "--n-color": "initial",
              "--n-color-hover": "initial",
              "--n-color-pressed": "initial",
              "--n-color-focus": "initial",
              "--n-color-disabled": "initial",
              "--n-ripple-color": "initial",
              "--n-text-color": "initial",
              "--n-text-color-hover": "initial",
              "--n-text-color-pressed": "initial",
              "--n-text-color-focus": "initial",
              "--n-text-color-disabled": "initial"
            };
            const typeIsTertiary = type === "tertiary";
            const typeIsDefault = type === "default";
            const mergedType = typeIsTertiary ? "default" : type;
            if (text) {
              const propTextColor = textColor || color;
              const mergedTextColor = propTextColor || self2[createKey("textColorText", mergedType)];
              colorProps = {
                "--n-color": "#0000",
                "--n-color-hover": "#0000",
                "--n-color-pressed": "#0000",
                "--n-color-focus": "#0000",
                "--n-color-disabled": "#0000",
                "--n-ripple-color": "#0000",
                "--n-text-color": mergedTextColor,
                "--n-text-color-hover": propTextColor ? createHoverColor(propTextColor) : self2[createKey("textColorTextHover", mergedType)],
                "--n-text-color-pressed": propTextColor ? createPressedColor(propTextColor) : self2[createKey("textColorTextPressed", mergedType)],
                "--n-text-color-focus": propTextColor ? createHoverColor(propTextColor) : self2[createKey("textColorTextHover", mergedType)],
                "--n-text-color-disabled": propTextColor || self2[createKey("textColorTextDisabled", mergedType)]
              };
            } else if (ghost || dashed) {
              const mergedTextColor = textColor || color;
              colorProps = {
                "--n-color": "#0000",
                "--n-color-hover": "#0000",
                "--n-color-pressed": "#0000",
                "--n-color-focus": "#0000",
                "--n-color-disabled": "#0000",
                "--n-ripple-color": color || self2[createKey("rippleColor", mergedType)],
                "--n-text-color": mergedTextColor || self2[createKey("textColorGhost", mergedType)],
                "--n-text-color-hover": mergedTextColor ? createHoverColor(mergedTextColor) : self2[createKey("textColorGhostHover", mergedType)],
                "--n-text-color-pressed": mergedTextColor ? createPressedColor(mergedTextColor) : self2[createKey("textColorGhostPressed", mergedType)],
                "--n-text-color-focus": mergedTextColor ? createHoverColor(mergedTextColor) : self2[createKey("textColorGhostHover", mergedType)],
                "--n-text-color-disabled": mergedTextColor || self2[createKey("textColorGhostDisabled", mergedType)]
              };
            } else if (secondary) {
              const typeTextColor = typeIsDefault ? self2.textColor : typeIsTertiary ? self2.textColorTertiary : self2[createKey("color", mergedType)];
              const mergedTextColor = color || typeTextColor;
              const isColoredType = type !== "default" && type !== "tertiary";
              colorProps = {
                "--n-color": isColoredType ? changeColor(mergedTextColor, {
                  alpha: Number(self2.colorOpacitySecondary)
                }) : self2.colorSecondary,
                "--n-color-hover": isColoredType ? changeColor(mergedTextColor, {
                  alpha: Number(self2.colorOpacitySecondaryHover)
                }) : self2.colorSecondaryHover,
                "--n-color-pressed": isColoredType ? changeColor(mergedTextColor, {
                  alpha: Number(self2.colorOpacitySecondaryPressed)
                }) : self2.colorSecondaryPressed,
                "--n-color-focus": isColoredType ? changeColor(mergedTextColor, {
                  alpha: Number(self2.colorOpacitySecondaryHover)
                }) : self2.colorSecondaryHover,
                "--n-color-disabled": self2.colorSecondary,
                "--n-ripple-color": "#0000",
                "--n-text-color": mergedTextColor,
                "--n-text-color-hover": mergedTextColor,
                "--n-text-color-pressed": mergedTextColor,
                "--n-text-color-focus": mergedTextColor,
                "--n-text-color-disabled": mergedTextColor
              };
            } else if (tertiary || quaternary) {
              const typeColor = typeIsDefault ? self2.textColor : typeIsTertiary ? self2.textColorTertiary : self2[createKey("color", mergedType)];
              const mergedColor = color || typeColor;
              if (tertiary) {
                colorProps["--n-color"] = self2.colorTertiary;
                colorProps["--n-color-hover"] = self2.colorTertiaryHover;
                colorProps["--n-color-pressed"] = self2.colorTertiaryPressed;
                colorProps["--n-color-focus"] = self2.colorSecondaryHover;
                colorProps["--n-color-disabled"] = self2.colorTertiary;
              } else {
                colorProps["--n-color"] = self2.colorQuaternary;
                colorProps["--n-color-hover"] = self2.colorQuaternaryHover;
                colorProps["--n-color-pressed"] = self2.colorQuaternaryPressed;
                colorProps["--n-color-focus"] = self2.colorQuaternaryHover;
                colorProps["--n-color-disabled"] = self2.colorQuaternary;
              }
              colorProps["--n-ripple-color"] = "#0000";
              colorProps["--n-text-color"] = mergedColor;
              colorProps["--n-text-color-hover"] = mergedColor;
              colorProps["--n-text-color-pressed"] = mergedColor;
              colorProps["--n-text-color-focus"] = mergedColor;
              colorProps["--n-text-color-disabled"] = mergedColor;
            } else {
              colorProps = {
                "--n-color": color || self2[createKey("color", mergedType)],
                "--n-color-hover": color ? createHoverColor(color) : self2[createKey("colorHover", mergedType)],
                "--n-color-pressed": color ? createPressedColor(color) : self2[createKey("colorPressed", mergedType)],
                "--n-color-focus": color ? createHoverColor(color) : self2[createKey("colorFocus", mergedType)],
                "--n-color-disabled": color || self2[createKey("colorDisabled", mergedType)],
                "--n-ripple-color": color || self2[createKey("rippleColor", mergedType)],
                "--n-text-color": textColor || (color ? self2.textColorPrimary : typeIsTertiary ? self2.textColorTertiary : self2[createKey("textColor", mergedType)]),
                "--n-text-color-hover": textColor || (color ? self2.textColorHoverPrimary : self2[createKey("textColorHover", mergedType)]),
                "--n-text-color-pressed": textColor || (color ? self2.textColorPressedPrimary : self2[createKey("textColorPressed", mergedType)]),
                "--n-text-color-focus": textColor || (color ? self2.textColorFocusPrimary : self2[createKey("textColorFocus", mergedType)]),
                "--n-text-color-disabled": textColor || (color ? self2.textColorDisabledPrimary : self2[createKey("textColorDisabled", mergedType)])
              };
            }
            let borderProps = {
              "--n-border": "initial",
              "--n-border-hover": "initial",
              "--n-border-pressed": "initial",
              "--n-border-focus": "initial",
              "--n-border-disabled": "initial"
            };
            if (text) {
              borderProps = {
                "--n-border": "none",
                "--n-border-hover": "none",
                "--n-border-pressed": "none",
                "--n-border-focus": "none",
                "--n-border-disabled": "none"
              };
            } else {
              borderProps = {
                "--n-border": self2[createKey("border", mergedType)],
                "--n-border-hover": self2[createKey("borderHover", mergedType)],
                "--n-border-pressed": self2[createKey("borderPressed", mergedType)],
                "--n-border-focus": self2[createKey("borderFocus", mergedType)],
                "--n-border-disabled": self2[createKey("borderDisabled", mergedType)]
              };
            }
            const {
              [createKey("height", size2)]: height,
              [createKey("fontSize", size2)]: fontSize2,
              [createKey("padding", size2)]: padding,
              [createKey("paddingRound", size2)]: paddingRound,
              [createKey("iconSize", size2)]: iconSize,
              [createKey("borderRadius", size2)]: borderRadius,
              [createKey("iconMargin", size2)]: iconMargin,
              waveOpacity
            } = self2;
            const sizeProps = {
              "--n-width": circle && !text ? height : "initial",
              "--n-height": text ? "initial" : height,
              "--n-font-size": fontSize2,
              "--n-padding": circle ? "initial" : text ? "initial" : round ? paddingRound : padding,
              "--n-icon-size": iconSize,
              "--n-icon-margin": iconMargin,
              "--n-border-radius": text ? "initial" : circle || round ? height : borderRadius
            };
            return Object.assign(Object.assign(Object.assign(Object.assign({
              "--n-bezier": cubicBezierEaseInOut2,
              "--n-bezier-ease-out": cubicBezierEaseOut2,
              "--n-ripple-duration": rippleDuration,
              "--n-opacity-disabled": opacityDisabled,
              "--n-wave-opacity": waveOpacity
            }, fontProps), colorProps), borderProps), sizeProps);
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("button", vue.computed(() => {
            let hash = "";
            const {
              dashed,
              type,
              ghost,
              text,
              color,
              round,
              circle,
              textColor,
              secondary,
              tertiary,
              quaternary,
              strong
            } = props;
            if (dashed)
              hash += "a";
            if (ghost)
              hash += "b";
            if (text)
              hash += "c";
            if (round)
              hash += "d";
            if (circle)
              hash += "e";
            if (secondary)
              hash += "f";
            if (tertiary)
              hash += "g";
            if (quaternary)
              hash += "h";
            if (strong)
              hash += "i";
            if (color)
              hash += "j" + color2Class(color);
            if (textColor)
              hash += "k" + color2Class(textColor);
            const {
              value: size2
            } = mergedSizeRef;
            hash += "l" + size2[0];
            hash += "m" + type[0];
            return hash;
          }), cssVarsRef, props) : void 0;
          return {
            selfElRef,
            waveElRef,
            mergedClsPrefix: mergedClsPrefixRef,
            mergedFocusable: mergedFocusableRef,
            mergedSize: mergedSizeRef,
            showBorder: showBorderRef,
            enterPressed: enterPressedRef,
            rtlEnabled: rtlEnabledRef,
            handleMousedown,
            handleKeydown,
            handleBlur,
            handleKeyup,
            handleClick: handleClick2,
            customColorCssVars: vue.computed(() => {
              const {
                color
              } = props;
              if (!color)
                return null;
              const hoverColor = createHoverColor(color);
              return {
                "--n-border-color": color,
                "--n-border-color-hover": hoverColor,
                "--n-border-color-pressed": createPressedColor(color),
                "--n-border-color-focus": hoverColor,
                "--n-border-color-disabled": color
              };
            }),
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          const {
            mergedClsPrefix,
            tag: Component,
            onRender
          } = this;
          onRender === null || onRender === void 0 ? void 0 : onRender();
          const children = resolveWrappedSlot(this.$slots.default, (children2) => children2 && vue.h("span", {
            class: `${mergedClsPrefix}-button__content`
          }, children2));
          return vue.h(Component, {
            ref: "selfElRef",
            class: [
              this.themeClass,
              `${mergedClsPrefix}-button`,
              `${mergedClsPrefix}-button--${this.type}-type`,
              `${mergedClsPrefix}-button--${this.mergedSize}-type`,
              this.rtlEnabled && `${mergedClsPrefix}-button--rtl`,
              this.disabled && `${mergedClsPrefix}-button--disabled`,
              this.block && `${mergedClsPrefix}-button--block`,
              this.enterPressed && `${mergedClsPrefix}-button--pressed`,
              !this.text && this.dashed && `${mergedClsPrefix}-button--dashed`,
              this.color && `${mergedClsPrefix}-button--color`,
              this.secondary && `${mergedClsPrefix}-button--secondary`,
              this.loading && `${mergedClsPrefix}-button--loading`,
              this.ghost && `${mergedClsPrefix}-button--ghost`
              // required for button group border collapse
            ],
            tabindex: this.mergedFocusable ? 0 : -1,
            type: this.attrType,
            style: this.cssVars,
            disabled: this.disabled,
            onClick: this.handleClick,
            onBlur: this.handleBlur,
            onMousedown: this.handleMousedown,
            onKeyup: this.handleKeyup,
            onKeydown: this.handleKeydown
          }, this.iconPlacement === "right" && children, vue.h(NFadeInExpandTransition, {
            width: true
          }, {
            default: () => resolveWrappedSlot(this.$slots.icon, (children2) => (this.loading || this.renderIcon || children2) && vue.h("span", {
              class: `${mergedClsPrefix}-button__icon`,
              style: {
                margin: isSlotEmpty(this.$slots.default) ? "0" : ""
              }
            }, vue.h(NIconSwitchTransition, null, {
              default: () => this.loading ? vue.h(NBaseLoading, {
                clsPrefix: mergedClsPrefix,
                key: "loading",
                class: `${mergedClsPrefix}-icon-slot`,
                strokeWidth: 20
              }) : vue.h("div", {
                key: "icon",
                class: `${mergedClsPrefix}-icon-slot`,
                role: "none"
              }, this.renderIcon ? this.renderIcon() : children2)
            })))
          }), this.iconPlacement === "left" && children, !this.text ? vue.h(NBaseWave, {
            ref: "waveElRef",
            clsPrefix: mergedClsPrefix
          }) : null, this.showBorder ? vue.h("div", {
            "aria-hidden": true,
            class: `${mergedClsPrefix}-button__border`,
            style: this.customColorCssVars
          }) : null, this.showBorder ? vue.h("div", {
            "aria-hidden": true,
            class: `${mergedClsPrefix}-button__state-border`,
            style: this.customColorCssVars
          }) : null);
        }
      });
      const NButton = Button;
      const commonVariables$1 = {
        paddingSmall: "12px 16px 12px",
        paddingMedium: "19px 24px 20px",
        paddingLarge: "23px 32px 24px",
        paddingHuge: "27px 40px 28px",
        titleFontSizeSmall: "16px",
        titleFontSizeMedium: "18px",
        titleFontSizeLarge: "18px",
        titleFontSizeHuge: "18px",
        closeIconSize: "18px",
        closeSize: "22px"
      };
      const self$9 = (vars) => {
        const {
          primaryColor,
          borderRadius,
          lineHeight: lineHeight2,
          fontSize: fontSize2,
          cardColor,
          textColor2,
          textColor1,
          dividerColor,
          fontWeightStrong,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          closeColorHover,
          closeColorPressed,
          modalColor,
          boxShadow1,
          popoverColor,
          actionColor
        } = vars;
        return Object.assign(Object.assign({}, commonVariables$1), {
          lineHeight: lineHeight2,
          color: cardColor,
          colorModal: modalColor,
          colorPopover: popoverColor,
          colorTarget: primaryColor,
          colorEmbedded: actionColor,
          colorEmbeddedModal: actionColor,
          colorEmbeddedPopover: actionColor,
          textColor: textColor2,
          titleTextColor: textColor1,
          borderColor: dividerColor,
          actionColor,
          titleFontWeight: fontWeightStrong,
          closeColorHover,
          closeColorPressed,
          closeBorderRadius: borderRadius,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          fontSizeSmall: fontSize2,
          fontSizeMedium: fontSize2,
          fontSizeLarge: fontSize2,
          fontSizeHuge: fontSize2,
          boxShadow: boxShadow1,
          borderRadius
        });
      };
      const cardLight = {
        name: "Card",
        common: commonLight,
        self: self$9
      };
      const cardLight$1 = cardLight;
      const style$7 = c([cB("card", `
 font-size: var(--n-font-size);
 line-height: var(--n-line-height);
 display: flex;
 flex-direction: column;
 width: 100%;
 box-sizing: border-box;
 position: relative;
 border-radius: var(--n-border-radius);
 background-color: var(--n-color);
 color: var(--n-text-color);
 word-break: break-word;
 transition: 
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `, [asModal({
        background: "var(--n-color-modal)"
      }), cM("hoverable", [c("&:hover", "box-shadow: var(--n-box-shadow);")]), cM("content-segmented", [c(">", [cE("content", {
        paddingTop: "var(--n-padding-bottom)"
      })])]), cM("content-soft-segmented", [c(">", [cE("content", `
 margin: 0 var(--n-padding-left);
 padding: var(--n-padding-bottom) 0;
 `)])]), cM("footer-segmented", [c(">", [cE("footer", {
        paddingTop: "var(--n-padding-bottom)"
      })])]), cM("footer-soft-segmented", [c(">", [cE("footer", `
 padding: var(--n-padding-bottom) 0;
 margin: 0 var(--n-padding-left);
 `)])]), c(">", [cB("card-header", `
 box-sizing: border-box;
 display: flex;
 align-items: center;
 font-size: var(--n-title-font-size);
 padding:
 var(--n-padding-top)
 var(--n-padding-left)
 var(--n-padding-bottom)
 var(--n-padding-left);
 `, [cE("main", `
 font-weight: var(--n-title-font-weight);
 transition: color .3s var(--n-bezier);
 flex: 1;
 min-width: 0;
 color: var(--n-title-text-color);
 `), cE("extra", `
 display: flex;
 align-items: center;
 font-size: var(--n-font-size);
 font-weight: 400;
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
 `), cE("close", `
 margin: 0 0 0 8px;
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `)]), cE("action", `
 box-sizing: border-box;
 transition:
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 background-clip: padding-box;
 background-color: var(--n-action-color);
 `), cE("content", "flex: 1; min-width: 0;"), cE("content, footer", `
 box-sizing: border-box;
 padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
 font-size: var(--n-font-size);
 `, [c("&:first-child", {
        paddingTop: "var(--n-padding-bottom)"
      })]), cE("action", `
 background-color: var(--n-action-color);
 padding: var(--n-padding-bottom) var(--n-padding-left);
 border-bottom-left-radius: var(--n-border-radius);
 border-bottom-right-radius: var(--n-border-radius);
 `)]), cB("card-cover", `
 overflow: hidden;
 width: 100%;
 border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;
 `, [c("img", `
 display: block;
 width: 100%;
 `)]), cM("bordered", `
 border: 1px solid var(--n-border-color);
 `, [c("&:target", "border-color: var(--n-color-target);")]), cM("action-segmented", [c(">", [cE("action", [c("&:not(:first-child)", {
        borderTop: "1px solid var(--n-border-color)"
      })])])]), cM("content-segmented, content-soft-segmented", [c(">", [cE("content", {
        transition: "border-color 0.3s var(--n-bezier)"
      }, [c("&:not(:first-child)", {
        borderTop: "1px solid var(--n-border-color)"
      })])])]), cM("footer-segmented, footer-soft-segmented", [c(">", [cE("footer", {
        transition: "border-color 0.3s var(--n-bezier)"
      }, [c("&:not(:first-child)", {
        borderTop: "1px solid var(--n-border-color)"
      })])])]), cM("embedded", `
 background-color: var(--n-color-embedded);
 `)]), insideModal(cB("card", `
 background: var(--n-color-modal);
 `, [cM("embedded", `
 background-color: var(--n-color-embedded-modal);
 `)])), insidePopover(cB("card", `
 background: var(--n-color-popover);
 `, [cM("embedded", `
 background-color: var(--n-color-embedded-popover);
 `)]))]);
      const cardBaseProps = {
        title: String,
        contentClass: String,
        contentStyle: [Object, String],
        headerClass: String,
        headerStyle: [Object, String],
        headerExtraClass: String,
        headerExtraStyle: [Object, String],
        footerClass: String,
        footerStyle: [Object, String],
        embedded: Boolean,
        segmented: {
          type: [Boolean, Object],
          default: false
        },
        size: {
          type: String,
          default: "medium"
        },
        bordered: {
          type: Boolean,
          default: true
        },
        closable: Boolean,
        hoverable: Boolean,
        role: String,
        onClose: [Function, Array],
        tag: {
          type: String,
          default: "div"
        }
      };
      const cardBasePropKeys = keysOf(cardBaseProps);
      const cardProps = Object.assign(Object.assign({}, useTheme.props), cardBaseProps);
      const NCard = vue.defineComponent({
        name: "Card",
        props: cardProps,
        setup(props) {
          const handleCloseClick = () => {
            const {
              onClose
            } = props;
            if (onClose)
              call$1(onClose);
          };
          const {
            inlineThemeDisabled,
            mergedClsPrefixRef,
            mergedRtlRef
          } = useConfig(props);
          const themeRef = useTheme("Card", "-card", style$7, cardLight$1, props, mergedClsPrefixRef);
          const rtlEnabledRef = useRtl("Card", mergedRtlRef, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              size: size2
            } = props;
            const {
              self: {
                color,
                colorModal,
                colorTarget,
                textColor,
                titleTextColor,
                titleFontWeight,
                borderColor,
                actionColor,
                borderRadius,
                lineHeight: lineHeight2,
                closeIconColor,
                closeIconColorHover,
                closeIconColorPressed,
                closeColorHover,
                closeColorPressed,
                closeBorderRadius,
                closeIconSize,
                closeSize,
                boxShadow,
                colorPopover,
                colorEmbedded,
                colorEmbeddedModal,
                colorEmbeddedPopover,
                [createKey("padding", size2)]: padding,
                [createKey("fontSize", size2)]: fontSize2,
                [createKey("titleFontSize", size2)]: titleFontSize
              },
              common: {
                cubicBezierEaseInOut: cubicBezierEaseInOut2
              }
            } = themeRef.value;
            const {
              top: paddingTop,
              left: paddingLeft,
              bottom: paddingBottom
            } = getMargin(padding);
            return {
              "--n-bezier": cubicBezierEaseInOut2,
              "--n-border-radius": borderRadius,
              "--n-color": color,
              "--n-color-modal": colorModal,
              "--n-color-popover": colorPopover,
              "--n-color-embedded": colorEmbedded,
              "--n-color-embedded-modal": colorEmbeddedModal,
              "--n-color-embedded-popover": colorEmbeddedPopover,
              "--n-color-target": colorTarget,
              "--n-text-color": textColor,
              "--n-line-height": lineHeight2,
              "--n-action-color": actionColor,
              "--n-title-text-color": titleTextColor,
              "--n-title-font-weight": titleFontWeight,
              "--n-close-icon-color": closeIconColor,
              "--n-close-icon-color-hover": closeIconColorHover,
              "--n-close-icon-color-pressed": closeIconColorPressed,
              "--n-close-color-hover": closeColorHover,
              "--n-close-color-pressed": closeColorPressed,
              "--n-border-color": borderColor,
              "--n-box-shadow": boxShadow,
              // size
              "--n-padding-top": paddingTop,
              "--n-padding-bottom": paddingBottom,
              "--n-padding-left": paddingLeft,
              "--n-font-size": fontSize2,
              "--n-title-font-size": titleFontSize,
              "--n-close-size": closeSize,
              "--n-close-icon-size": closeIconSize,
              "--n-close-border-radius": closeBorderRadius
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("card", vue.computed(() => {
            return props.size[0];
          }), cssVarsRef, props) : void 0;
          return {
            rtlEnabled: rtlEnabledRef,
            mergedClsPrefix: mergedClsPrefixRef,
            mergedTheme: themeRef,
            handleCloseClick,
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          const {
            segmented,
            bordered,
            hoverable,
            mergedClsPrefix,
            rtlEnabled,
            onRender,
            embedded,
            tag: Component,
            $slots
          } = this;
          onRender === null || onRender === void 0 ? void 0 : onRender();
          return vue.h(Component, {
            class: [`${mergedClsPrefix}-card`, this.themeClass, embedded && `${mergedClsPrefix}-card--embedded`, {
              [`${mergedClsPrefix}-card--rtl`]: rtlEnabled,
              [`${mergedClsPrefix}-card--content${typeof segmented !== "boolean" && segmented.content === "soft" ? "-soft" : ""}-segmented`]: segmented === true || segmented !== false && segmented.content,
              [`${mergedClsPrefix}-card--footer${typeof segmented !== "boolean" && segmented.footer === "soft" ? "-soft" : ""}-segmented`]: segmented === true || segmented !== false && segmented.footer,
              [`${mergedClsPrefix}-card--action-segmented`]: segmented === true || segmented !== false && segmented.action,
              [`${mergedClsPrefix}-card--bordered`]: bordered,
              [`${mergedClsPrefix}-card--hoverable`]: hoverable
            }],
            style: this.cssVars,
            role: this.role
          }, resolveWrappedSlot($slots.cover, (children) => children && vue.h("div", {
            class: `${mergedClsPrefix}-card-cover`,
            role: "none"
          }, children)), resolveWrappedSlot($slots.header, (children) => {
            return children || this.title || this.closable ? vue.h("div", {
              class: [`${mergedClsPrefix}-card-header`, this.headerClass],
              style: this.headerStyle
            }, vue.h("div", {
              class: `${mergedClsPrefix}-card-header__main`,
              role: "heading"
            }, children || this.title), resolveWrappedSlot($slots["header-extra"], (children2) => children2 && vue.h("div", {
              class: [`${mergedClsPrefix}-card-header__extra`, this.headerExtraClass],
              style: this.headerExtraStyle
            }, children2)), this.closable ? vue.h(NBaseClose, {
              clsPrefix: mergedClsPrefix,
              class: `${mergedClsPrefix}-card-header__close`,
              onClick: this.handleCloseClick,
              absolute: true
            }) : null) : null;
          }), resolveWrappedSlot($slots.default, (children) => children && vue.h("div", {
            class: [`${mergedClsPrefix}-card__content`, this.contentClass],
            style: this.contentStyle,
            role: "none"
          }, children)), resolveWrappedSlot($slots.footer, (children) => children && [vue.h("div", {
            class: [`${mergedClsPrefix}-card__footer`, this.footerClass],
            style: this.footerStyle,
            role: "none"
          }, children)]), resolveWrappedSlot($slots.action, (children) => children && vue.h("div", {
            class: `${mergedClsPrefix}-card__action`,
            role: "none"
          }, children)));
        }
      });
      const self$8 = (vars) => {
        const {
          fontWeight,
          textColor1,
          textColor2,
          textColorDisabled,
          dividerColor,
          fontSize: fontSize2
        } = vars;
        return {
          titleFontSize: fontSize2,
          titleFontWeight: fontWeight,
          dividerColor,
          titleTextColor: textColor1,
          titleTextColorDisabled: textColorDisabled,
          fontSize: fontSize2,
          textColor: textColor2,
          arrowColor: textColor2,
          arrowColorDisabled: textColorDisabled,
          itemMargin: "16px 0 0 0",
          titlePadding: "16px 0 0 0"
        };
      };
      const collapseLight = {
        name: "Collapse",
        common: commonLight,
        self: self$8
      };
      const collapseLight$1 = collapseLight;
      const style$6 = cB("collapse", "width: 100%;", [cB("collapse-item", `
 font-size: var(--n-font-size);
 color: var(--n-text-color);
 transition:
 color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 margin: var(--n-item-margin);
 `, [cM("disabled", [cE("header", "cursor: not-allowed;", [cE("header-main", `
 color: var(--n-title-text-color-disabled);
 `), cB("collapse-item-arrow", `
 color: var(--n-arrow-color-disabled);
 `)])]), cB("collapse-item", "margin-left: 32px;"), c("&:first-child", "margin-top: 0;"), c("&:first-child >", [cE("header", "padding-top: 0;")]), cM("left-arrow-placement", [cE("header", [cB("collapse-item-arrow", "margin-right: 4px;")])]), cM("right-arrow-placement", [cE("header", [cB("collapse-item-arrow", "margin-left: 4px;")])]), cE("content-wrapper", [cE("content-inner", "padding-top: 16px;"), fadeInHeightExpandTransition({
        duration: "0.15s"
      })]), cM("active", [cE("header", [cM("active", [cB("collapse-item-arrow", "transform: rotate(90deg);")])])]), c("&:not(:first-child)", "border-top: 1px solid var(--n-divider-color);"), cNotM("disabled", [cM("trigger-area-main", [cE("header", [cE("header-main", "cursor: pointer;"), cB("collapse-item-arrow", "cursor: default;")])]), cM("trigger-area-arrow", [cE("header", [cB("collapse-item-arrow", "cursor: pointer;")])]), cM("trigger-area-extra", [cE("header", [cE("header-extra", "cursor: pointer;")])])]), cE("header", `
 font-size: var(--n-title-font-size);
 display: flex;
 flex-wrap: nowrap;
 align-items: center;
 transition: color .3s var(--n-bezier);
 position: relative;
 padding: var(--n-title-padding);
 color: var(--n-title-text-color);
 `, [cE("header-main", `
 display: flex;
 flex-wrap: nowrap;
 align-items: center;
 font-weight: var(--n-title-font-weight);
 transition: color .3s var(--n-bezier);
 flex: 1;
 color: var(--n-title-text-color);
 `), cE("header-extra", `
 display: flex;
 align-items: center;
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
 `), cB("collapse-item-arrow", `
 display: flex;
 transition:
 transform .15s var(--n-bezier),
 color .3s var(--n-bezier);
 font-size: 18px;
 color: var(--n-arrow-color);
 `)])])]);
      const collapseProps = Object.assign(Object.assign({}, useTheme.props), {
        defaultExpandedNames: {
          type: [Array, String],
          default: null
        },
        expandedNames: [Array, String],
        arrowPlacement: {
          type: String,
          default: "left"
        },
        accordion: {
          type: Boolean,
          default: false
        },
        displayDirective: {
          type: String,
          default: "if"
        },
        triggerAreas: {
          type: Array,
          default: () => ["main", "extra", "arrow"]
        },
        onItemHeaderClick: [Function, Array],
        "onUpdate:expandedNames": [Function, Array],
        onUpdateExpandedNames: [Function, Array],
        // deprecated
        onExpandedNamesChange: {
          type: [Function, Array],
          validator: () => {
            return true;
          },
          default: void 0
        }
      });
      const collapseInjectionKey = createInjectionKey("n-collapse");
      const NCollapse = vue.defineComponent({
        name: "Collapse",
        props: collapseProps,
        setup(props, {
          slots
        }) {
          const {
            mergedClsPrefixRef,
            inlineThemeDisabled,
            mergedRtlRef
          } = useConfig(props);
          const uncontrolledExpandedNamesRef = vue.ref(props.defaultExpandedNames);
          const controlledExpandedNamesRef = vue.computed(() => props.expandedNames);
          const mergedExpandedNamesRef = useMergedState(controlledExpandedNamesRef, uncontrolledExpandedNamesRef);
          const themeRef = useTheme("Collapse", "-collapse", style$6, collapseLight$1, props, mergedClsPrefixRef);
          function doUpdateExpandedNames(names) {
            const {
              "onUpdate:expandedNames": _onUpdateExpandedNames,
              onUpdateExpandedNames,
              onExpandedNamesChange
            } = props;
            if (onUpdateExpandedNames) {
              call$1(onUpdateExpandedNames, names);
            }
            if (_onUpdateExpandedNames) {
              call$1(_onUpdateExpandedNames, names);
            }
            if (onExpandedNamesChange) {
              call$1(onExpandedNamesChange, names);
            }
            uncontrolledExpandedNamesRef.value = names;
          }
          function doItemHeaderClick(info) {
            const {
              onItemHeaderClick
            } = props;
            if (onItemHeaderClick) {
              call$1(onItemHeaderClick, info);
            }
          }
          function toggleItem(collapse, name, event) {
            const {
              accordion
            } = props;
            const {
              value: expandedNames
            } = mergedExpandedNamesRef;
            if (accordion) {
              if (collapse) {
                doUpdateExpandedNames([name]);
                doItemHeaderClick({
                  name,
                  expanded: true,
                  event
                });
              } else {
                doUpdateExpandedNames([]);
                doItemHeaderClick({
                  name,
                  expanded: false,
                  event
                });
              }
            } else {
              if (!Array.isArray(expandedNames)) {
                doUpdateExpandedNames([name]);
                doItemHeaderClick({
                  name,
                  expanded: true,
                  event
                });
              } else {
                const activeNames = expandedNames.slice();
                const index = activeNames.findIndex((activeName) => name === activeName);
                if (~index) {
                  activeNames.splice(index, 1);
                  doUpdateExpandedNames(activeNames);
                  doItemHeaderClick({
                    name,
                    expanded: false,
                    event
                  });
                } else {
                  activeNames.push(name);
                  doUpdateExpandedNames(activeNames);
                  doItemHeaderClick({
                    name,
                    expanded: true,
                    event
                  });
                }
              }
            }
          }
          vue.provide(collapseInjectionKey, {
            props,
            mergedClsPrefixRef,
            expandedNamesRef: mergedExpandedNamesRef,
            slots,
            toggleItem
          });
          const rtlEnabledRef = useRtl("Collapse", mergedRtlRef, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              common: {
                cubicBezierEaseInOut: cubicBezierEaseInOut2
              },
              self: {
                titleFontWeight,
                dividerColor,
                titlePadding,
                titleTextColor,
                titleTextColorDisabled,
                textColor,
                arrowColor,
                fontSize: fontSize2,
                titleFontSize,
                arrowColorDisabled,
                itemMargin
              }
            } = themeRef.value;
            return {
              "--n-font-size": fontSize2,
              "--n-bezier": cubicBezierEaseInOut2,
              "--n-text-color": textColor,
              "--n-divider-color": dividerColor,
              "--n-title-padding": titlePadding,
              "--n-title-font-size": titleFontSize,
              "--n-title-text-color": titleTextColor,
              "--n-title-text-color-disabled": titleTextColorDisabled,
              "--n-title-font-weight": titleFontWeight,
              "--n-arrow-color": arrowColor,
              "--n-arrow-color-disabled": arrowColorDisabled,
              "--n-item-margin": itemMargin
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("collapse", void 0, cssVarsRef, props) : void 0;
          return {
            rtlEnabled: rtlEnabledRef,
            mergedTheme: themeRef,
            mergedClsPrefix: mergedClsPrefixRef,
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          var _a;
          (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
          return vue.h("div", {
            class: [`${this.mergedClsPrefix}-collapse`, this.rtlEnabled && `${this.mergedClsPrefix}-collapse--rtl`, this.themeClass],
            style: this.cssVars
          }, this.$slots);
        }
      });
      const NCollapseItemContent = vue.defineComponent({
        name: "CollapseItemContent",
        props: {
          displayDirective: {
            type: String,
            required: true
          },
          show: Boolean,
          clsPrefix: {
            type: String,
            required: true
          }
        },
        setup(props) {
          const onceTrueRef = useFalseUntilTruthy(vue.toRef(props, "show"));
          return {
            onceTrue: onceTrueRef
          };
        },
        render() {
          return vue.h(NFadeInExpandTransition, null, {
            default: () => {
              const {
                show,
                displayDirective,
                onceTrue,
                clsPrefix
              } = this;
              const useVShow = displayDirective === "show" && onceTrue;
              const contentNode = vue.h("div", {
                class: `${clsPrefix}-collapse-item__content-wrapper`
              }, vue.h("div", {
                class: `${clsPrefix}-collapse-item__content-inner`
              }, this.$slots));
              return useVShow ? vue.withDirectives(contentNode, [[vue.vShow, show]]) : show ? contentNode : null;
            }
          });
        }
      });
      const collapseItemProps = {
        title: String,
        name: [String, Number],
        disabled: Boolean,
        displayDirective: String
      };
      const NCollapseItem = vue.defineComponent({
        name: "CollapseItem",
        props: collapseItemProps,
        setup(props) {
          const {
            mergedRtlRef
          } = useConfig(props);
          const randomName = createId();
          const mergedNameRef = useMemo(() => {
            var _a;
            return (_a = props.name) !== null && _a !== void 0 ? _a : randomName;
          });
          const NCollapse2 = vue.inject(collapseInjectionKey);
          if (!NCollapse2) {
            throwError("collapse-item", "`n-collapse-item` must be placed inside `n-collapse`.");
          }
          const {
            expandedNamesRef,
            props: collapseProps2,
            mergedClsPrefixRef,
            slots: collapseSlots
          } = NCollapse2;
          const collapsedRef = vue.computed(() => {
            const {
              value: expandedNames
            } = expandedNamesRef;
            if (Array.isArray(expandedNames)) {
              const {
                value: name
              } = mergedNameRef;
              return !~expandedNames.findIndex((expandedName) => expandedName === name);
            } else if (expandedNames) {
              const {
                value: name
              } = mergedNameRef;
              return name !== expandedNames;
            }
            return true;
          });
          const rtlEnabledRef = useRtl("Collapse", mergedRtlRef, mergedClsPrefixRef);
          return {
            rtlEnabled: rtlEnabledRef,
            collapseSlots,
            randomName,
            mergedClsPrefix: mergedClsPrefixRef,
            collapsed: collapsedRef,
            triggerAreas: vue.toRef(collapseProps2, "triggerAreas"),
            mergedDisplayDirective: vue.computed(() => {
              const {
                displayDirective
              } = props;
              if (displayDirective) {
                return displayDirective;
              } else {
                return collapseProps2.displayDirective;
              }
            }),
            arrowPlacement: vue.computed(() => {
              return collapseProps2.arrowPlacement;
            }),
            handleClick(e) {
              let happensInArea = "main";
              if (happensIn(e, "arrow"))
                happensInArea = "arrow";
              if (happensIn(e, "extra"))
                happensInArea = "extra";
              if (!collapseProps2.triggerAreas.includes(happensInArea)) {
                return;
              }
              if (NCollapse2 && !props.disabled) {
                NCollapse2.toggleItem(collapsedRef.value, mergedNameRef.value, e);
              }
            }
          };
        },
        render() {
          const {
            collapseSlots,
            $slots,
            arrowPlacement,
            collapsed,
            mergedDisplayDirective,
            mergedClsPrefix,
            disabled,
            triggerAreas
          } = this;
          const headerNode = resolveSlotWithProps($slots.header, {
            collapsed
          }, () => [this.title]);
          const headerExtraSlot = $slots["header-extra"] || collapseSlots["header-extra"];
          const arrowSlot = $slots.arrow || collapseSlots.arrow;
          return vue.h("div", {
            class: [`${mergedClsPrefix}-collapse-item`, `${mergedClsPrefix}-collapse-item--${arrowPlacement}-arrow-placement`, disabled && `${mergedClsPrefix}-collapse-item--disabled`, !collapsed && `${mergedClsPrefix}-collapse-item--active`, triggerAreas.map((area) => {
              return `${mergedClsPrefix}-collapse-item--trigger-area-${area}`;
            })]
          }, vue.h("div", {
            class: [`${mergedClsPrefix}-collapse-item__header`, !collapsed && `${mergedClsPrefix}-collapse-item__header--active`]
          }, vue.h("div", {
            class: `${mergedClsPrefix}-collapse-item__header-main`,
            onClick: this.handleClick
          }, arrowPlacement === "right" && headerNode, vue.h("div", {
            class: `${mergedClsPrefix}-collapse-item-arrow`,
            key: this.rtlEnabled ? 0 : 1,
            "data-arrow": true
          }, resolveSlotWithProps(arrowSlot, {
            collapsed
          }, () => {
            var _a;
            return [vue.h(NBaseIcon, {
              clsPrefix: mergedClsPrefix
            }, {
              default: (_a = collapseSlots.expandIcon) !== null && _a !== void 0 ? _a : () => this.rtlEnabled ? vue.h(ChevronLeftIcon, null) : vue.h(ChevronRightIcon, null)
            })];
          })), arrowPlacement === "left" && headerNode), resolveWrappedSlotWithProps(headerExtraSlot, {
            collapsed
          }, (children) => vue.h("div", {
            class: `${mergedClsPrefix}-collapse-item__header-extra`,
            onClick: this.handleClick,
            "data-extra": true
          }, children))), vue.h(NCollapseItemContent, {
            clsPrefix: mergedClsPrefix,
            displayDirective: mergedDisplayDirective,
            show: !collapsed
          }, $slots));
        }
      });
      const configProviderProps = {
        abstract: Boolean,
        bordered: {
          type: Boolean,
          default: void 0
        },
        clsPrefix: {
          type: String,
          default: defaultClsPrefix
        },
        locale: Object,
        dateLocale: Object,
        namespace: String,
        rtl: Array,
        tag: {
          type: String,
          default: "div"
        },
        hljs: Object,
        katex: Object,
        theme: Object,
        themeOverrides: Object,
        componentOptions: Object,
        icons: Object,
        breakpoints: Object,
        preflightStyleDisabled: Boolean,
        inlineThemeDisabled: {
          type: Boolean,
          default: void 0
        },
        // deprecated
        as: {
          type: String,
          validator: () => {
            warn$2("config-provider", "`as` is deprecated, please use `tag` instead.");
            return true;
          },
          default: void 0
        }
      };
      const NConfigProvider = vue.defineComponent({
        name: "ConfigProvider",
        alias: ["App"],
        props: configProviderProps,
        setup(props) {
          const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
          const mergedThemeRef = vue.computed(() => {
            const {
              theme
            } = props;
            if (theme === null)
              return void 0;
            const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
            return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
          });
          const mergedThemeOverridesRef = vue.computed(() => {
            const {
              themeOverrides
            } = props;
            if (themeOverrides === null)
              return void 0;
            if (themeOverrides === void 0) {
              return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
            } else {
              const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
              if (inheritedThemeOverrides === void 0) {
                return themeOverrides;
              } else {
                return merge$3({}, inheritedThemeOverrides, themeOverrides);
              }
            }
          });
          const mergedNamespaceRef = useMemo(() => {
            const {
              namespace: namespace2
            } = props;
            return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
          });
          const mergedBorderedRef = useMemo(() => {
            const {
              bordered
            } = props;
            return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
          });
          const mergedIconsRef = vue.computed(() => {
            const {
              icons
            } = props;
            return icons === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons;
          });
          const mergedComponentPropsRef = vue.computed(() => {
            const {
              componentOptions
            } = props;
            if (componentOptions !== void 0)
              return componentOptions;
            return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
          });
          const mergedClsPrefixRef = vue.computed(() => {
            const {
              clsPrefix
            } = props;
            if (clsPrefix !== void 0)
              return clsPrefix;
            if (NConfigProvider2)
              return NConfigProvider2.mergedClsPrefixRef.value;
            return defaultClsPrefix;
          });
          const mergedRtlRef = vue.computed(() => {
            var _a;
            const {
              rtl
            } = props;
            if (rtl === void 0) {
              return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
            }
            const rtlEnabledState = {};
            for (const rtlInfo of rtl) {
              rtlEnabledState[rtlInfo.name] = vue.markRaw(rtlInfo);
              (_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach((peerRtlInfo) => {
                if (!(peerRtlInfo.name in rtlEnabledState)) {
                  rtlEnabledState[peerRtlInfo.name] = vue.markRaw(peerRtlInfo);
                }
              });
            }
            return rtlEnabledState;
          });
          const mergedBreakpointsRef = vue.computed(() => {
            return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
          });
          const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
          const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
          const mergedThemeHashRef = vue.computed(() => {
            const {
              value: theme
            } = mergedThemeRef;
            const {
              value: mergedThemeOverrides
            } = mergedThemeOverridesRef;
            const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
            const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
            if (themeName) {
              if (hasThemeOverrides) {
                return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
              }
              return themeName;
            } else {
              if (hasThemeOverrides) {
                return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
              }
              return "";
            }
          });
          vue.provide(configProviderInjectionKey, {
            mergedThemeHashRef,
            mergedBreakpointsRef,
            mergedRtlRef,
            mergedIconsRef,
            mergedComponentPropsRef,
            mergedBorderedRef,
            mergedNamespaceRef,
            mergedClsPrefixRef,
            mergedLocaleRef: vue.computed(() => {
              const {
                locale
              } = props;
              if (locale === null)
                return void 0;
              return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
            }),
            mergedDateLocaleRef: vue.computed(() => {
              const {
                dateLocale
              } = props;
              if (dateLocale === null)
                return void 0;
              return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
            }),
            mergedHljsRef: vue.computed(() => {
              const {
                hljs
              } = props;
              return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
            }),
            mergedKatexRef: vue.computed(() => {
              const {
                katex
              } = props;
              return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
            }),
            mergedThemeRef,
            mergedThemeOverridesRef,
            inlineThemeDisabled: inlineThemeDisabled || false,
            preflightStyleDisabled: preflightStyleDisabled || false
          });
          return {
            mergedClsPrefix: mergedClsPrefixRef,
            mergedBordered: mergedBorderedRef,
            mergedNamespace: mergedNamespaceRef,
            mergedTheme: mergedThemeRef,
            mergedThemeOverrides: mergedThemeOverridesRef
          };
        },
        render() {
          var _a, _b, _c, _d;
          return !this.abstract ? vue.h(this.as || this.tag, {
            class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
          }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);
        }
      });
      var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
      function getDefaultExportFromCjs(x) {
        return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
      }
      function getAugmentedNamespace(n) {
        if (n.__esModule)
          return n;
        var f = n.default;
        if (typeof f == "function") {
          var a = function a2() {
            if (this instanceof a2) {
              return Reflect.construct(f, arguments, this.constructor);
            }
            return f.apply(this, arguments);
          };
          a.prototype = f.prototype;
        } else
          a = {};
        Object.defineProperty(a, "__esModule", { value: true });
        Object.keys(n).forEach(function(k) {
          var d = Object.getOwnPropertyDescriptor(n, k);
          Object.defineProperty(a, k, d.get ? d : {
            enumerable: true,
            get: function() {
              return n[k];
            }
          });
        });
        return a;
      }
      const commonVars$2 = {
        titleFontSize: "18px",
        padding: "16px 28px 20px 28px",
        iconSize: "28px",
        actionSpace: "12px",
        contentMargin: "8px 0 16px 0",
        iconMargin: "0 4px 0 0",
        iconMarginIconTop: "4px 0 8px 0",
        closeSize: "22px",
        closeIconSize: "18px",
        closeMargin: "20px 26px 0 0",
        closeMarginIconTop: "10px 16px 0 0"
      };
      const self$7 = (vars) => {
        const {
          textColor1,
          textColor2,
          modalColor,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          closeColorHover,
          closeColorPressed,
          infoColor,
          successColor,
          warningColor,
          errorColor,
          primaryColor,
          dividerColor,
          borderRadius,
          fontWeightStrong,
          lineHeight: lineHeight2,
          fontSize: fontSize2
        } = vars;
        return Object.assign(Object.assign({}, commonVars$2), {
          fontSize: fontSize2,
          lineHeight: lineHeight2,
          border: `1px solid ${dividerColor}`,
          titleTextColor: textColor1,
          textColor: textColor2,
          color: modalColor,
          closeColorHover,
          closeColorPressed,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          closeBorderRadius: borderRadius,
          iconColor: primaryColor,
          iconColorInfo: infoColor,
          iconColorSuccess: successColor,
          iconColorWarning: warningColor,
          iconColorError: errorColor,
          borderRadius,
          titleFontWeight: fontWeightStrong
        });
      };
      const dialogLight = createTheme({
        name: "Dialog",
        common: commonLight,
        peers: {
          Button: buttonLight$1
        },
        self: self$7
      });
      const dialogLight$1 = dialogLight;
      const dialogProps = {
        icon: Function,
        type: {
          type: String,
          default: "default"
        },
        title: [String, Function],
        closable: {
          type: Boolean,
          default: true
        },
        negativeText: String,
        positiveText: String,
        positiveButtonProps: Object,
        negativeButtonProps: Object,
        content: [String, Function],
        action: Function,
        showIcon: {
          type: Boolean,
          default: true
        },
        loading: Boolean,
        bordered: Boolean,
        iconPlacement: String,
        onPositiveClick: Function,
        onNegativeClick: Function,
        onClose: Function
      };
      const dialogPropKeys = keysOf(dialogProps);
      const style$5 = c([cB("dialog", `
 --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);
 word-break: break-word;
 line-height: var(--n-line-height);
 position: relative;
 background: var(--n-color);
 color: var(--n-text-color);
 box-sizing: border-box;
 margin: auto;
 border-radius: var(--n-border-radius);
 padding: var(--n-padding);
 transition: 
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `, [cE("icon", {
        color: "var(--n-icon-color)"
      }), cM("bordered", {
        border: "var(--n-border)"
      }), cM("icon-top", [cE("close", {
        margin: "var(--n-close-margin)"
      }), cE("icon", {
        margin: "var(--n-icon-margin)"
      }), cE("content", {
        textAlign: "center"
      }), cE("title", {
        justifyContent: "center"
      }), cE("action", {
        justifyContent: "center"
      })]), cM("icon-left", [cE("icon", {
        margin: "var(--n-icon-margin)"
      }), cM("closable", [cE("title", `
 padding-right: calc(var(--n-close-size) + 6px);
 `)])]), cE("close", `
 position: absolute;
 right: 0;
 top: 0;
 margin: var(--n-close-margin);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 z-index: 1;
 `), cE("content", `
 font-size: var(--n-font-size);
 margin: var(--n-content-margin);
 position: relative;
 word-break: break-word;
 `, [cM("last", "margin-bottom: 0;")]), cE("action", `
 display: flex;
 justify-content: flex-end;
 `, [c("> *:not(:last-child)", `
 margin-right: var(--n-action-space);
 `)]), cE("icon", `
 font-size: var(--n-icon-size);
 transition: color .3s var(--n-bezier);
 `), cE("title", `
 transition: color .3s var(--n-bezier);
 display: flex;
 align-items: center;
 font-size: var(--n-title-font-size);
 font-weight: var(--n-title-font-weight);
 color: var(--n-title-text-color);
 `), cB("dialog-icon-container", `
 display: flex;
 justify-content: center;
 `)]), insideModal(cB("dialog", `
 width: 446px;
 max-width: calc(100vw - 32px);
 `)), cB("dialog", [asModal(`
 width: 446px;
 max-width: calc(100vw - 32px);
 `)])]);
      const iconRenderMap$2 = {
        default: () => vue.h(InfoIcon, null),
        info: () => vue.h(InfoIcon, null),
        success: () => vue.h(SuccessIcon, null),
        warning: () => vue.h(WarningIcon, null),
        error: () => vue.h(ErrorIcon, null)
      };
      const NDialog = vue.defineComponent({
        name: "Dialog",
        alias: [
          "NimbusConfirmCard",
          // deprecated
          "Confirm"
          // deprecated
        ],
        props: Object.assign(Object.assign({}, useTheme.props), dialogProps),
        setup(props) {
          const {
            mergedComponentPropsRef,
            mergedClsPrefixRef,
            inlineThemeDisabled,
            mergedRtlRef
          } = useConfig(props);
          const rtlEnabledRef = useRtl("Dialog", mergedRtlRef, mergedClsPrefixRef);
          const mergedIconPlacementRef = vue.computed(() => {
            var _a, _b;
            const {
              iconPlacement
            } = props;
            return iconPlacement || ((_b = (_a = mergedComponentPropsRef === null || mergedComponentPropsRef === void 0 ? void 0 : mergedComponentPropsRef.value) === null || _a === void 0 ? void 0 : _a.Dialog) === null || _b === void 0 ? void 0 : _b.iconPlacement) || "left";
          });
          function handlePositiveClick(e) {
            const {
              onPositiveClick
            } = props;
            if (onPositiveClick)
              onPositiveClick(e);
          }
          function handleNegativeClick(e) {
            const {
              onNegativeClick
            } = props;
            if (onNegativeClick)
              onNegativeClick(e);
          }
          function handleCloseClick() {
            const {
              onClose
            } = props;
            if (onClose)
              onClose();
          }
          const themeRef = useTheme("Dialog", "-dialog", style$5, dialogLight$1, props, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              type
            } = props;
            const iconPlacement = mergedIconPlacementRef.value;
            const {
              common: {
                cubicBezierEaseInOut: cubicBezierEaseInOut2
              },
              self: {
                fontSize: fontSize2,
                lineHeight: lineHeight2,
                border,
                titleTextColor,
                textColor,
                color,
                closeBorderRadius,
                closeColorHover,
                closeColorPressed,
                closeIconColor,
                closeIconColorHover,
                closeIconColorPressed,
                closeIconSize,
                borderRadius,
                titleFontWeight,
                titleFontSize,
                padding,
                iconSize,
                actionSpace,
                contentMargin,
                closeSize,
                [iconPlacement === "top" ? "iconMarginIconTop" : "iconMargin"]: iconMargin,
                [iconPlacement === "top" ? "closeMarginIconTop" : "closeMargin"]: closeMargin,
                [createKey("iconColor", type)]: iconColor
              }
            } = themeRef.value;
            const iconMarginDiscrete = getMargin(iconMargin);
            return {
              "--n-font-size": fontSize2,
              "--n-icon-color": iconColor,
              "--n-bezier": cubicBezierEaseInOut2,
              "--n-close-margin": closeMargin,
              "--n-icon-margin-top": iconMarginDiscrete.top,
              "--n-icon-margin-right": iconMarginDiscrete.right,
              "--n-icon-margin-bottom": iconMarginDiscrete.bottom,
              "--n-icon-margin-left": iconMarginDiscrete.left,
              "--n-icon-size": iconSize,
              "--n-close-size": closeSize,
              "--n-close-icon-size": closeIconSize,
              "--n-close-border-radius": closeBorderRadius,
              "--n-close-color-hover": closeColorHover,
              "--n-close-color-pressed": closeColorPressed,
              "--n-close-icon-color": closeIconColor,
              "--n-close-icon-color-hover": closeIconColorHover,
              "--n-close-icon-color-pressed": closeIconColorPressed,
              "--n-color": color,
              "--n-text-color": textColor,
              "--n-border-radius": borderRadius,
              "--n-padding": padding,
              "--n-line-height": lineHeight2,
              "--n-border": border,
              "--n-content-margin": contentMargin,
              "--n-title-font-size": titleFontSize,
              "--n-title-font-weight": titleFontWeight,
              "--n-title-text-color": titleTextColor,
              "--n-action-space": actionSpace
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("dialog", vue.computed(() => `${props.type[0]}${mergedIconPlacementRef.value[0]}`), cssVarsRef, props) : void 0;
          return {
            mergedClsPrefix: mergedClsPrefixRef,
            rtlEnabled: rtlEnabledRef,
            mergedIconPlacement: mergedIconPlacementRef,
            mergedTheme: themeRef,
            handlePositiveClick,
            handleNegativeClick,
            handleCloseClick,
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          var _a;
          const {
            bordered,
            mergedIconPlacement,
            cssVars,
            closable,
            showIcon,
            title,
            content,
            action,
            negativeText,
            positiveText,
            positiveButtonProps,
            negativeButtonProps,
            handlePositiveClick,
            handleNegativeClick,
            mergedTheme,
            loading,
            type,
            mergedClsPrefix
          } = this;
          (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
          const icon = showIcon ? vue.h(NBaseIcon, {
            clsPrefix: mergedClsPrefix,
            class: `${mergedClsPrefix}-dialog__icon`
          }, {
            default: () => resolveWrappedSlot(this.$slots.icon, (children) => children || (this.icon ? render$1(this.icon) : iconRenderMap$2[this.type]()))
          }) : null;
          const actionNode = resolveWrappedSlot(this.$slots.action, (children) => children || positiveText || negativeText || action ? vue.h("div", {
            class: `${mergedClsPrefix}-dialog__action`
          }, children || (action ? [render$1(action)] : [this.negativeText && vue.h(NButton, Object.assign({
            theme: mergedTheme.peers.Button,
            themeOverrides: mergedTheme.peerOverrides.Button,
            ghost: true,
            size: "small",
            onClick: handleNegativeClick
          }, negativeButtonProps), {
            default: () => render$1(this.negativeText)
          }), this.positiveText && vue.h(NButton, Object.assign({
            theme: mergedTheme.peers.Button,
            themeOverrides: mergedTheme.peerOverrides.Button,
            size: "small",
            type: type === "default" ? "primary" : type,
            disabled: loading,
            loading,
            onClick: handlePositiveClick
          }, positiveButtonProps), {
            default: () => render$1(this.positiveText)
          })])) : null);
          return vue.h("div", {
            class: [`${mergedClsPrefix}-dialog`, this.themeClass, this.closable && `${mergedClsPrefix}-dialog--closable`, `${mergedClsPrefix}-dialog--icon-${mergedIconPlacement}`, bordered && `${mergedClsPrefix}-dialog--bordered`, this.rtlEnabled && `${mergedClsPrefix}-dialog--rtl`],
            style: cssVars,
            role: "dialog"
          }, closable ? resolveWrappedSlot(this.$slots.close, (node) => {
            const classNames = [`${mergedClsPrefix}-dialog__close`, this.rtlEnabled && `${mergedClsPrefix}-dialog--rtl`];
            return node ? vue.h("div", {
              class: classNames
            }, node) : vue.h(NBaseClose, {
              clsPrefix: mergedClsPrefix,
              class: classNames,
              onClick: this.handleCloseClick
            });
          }) : null, showIcon && mergedIconPlacement === "top" ? vue.h("div", {
            class: `${mergedClsPrefix}-dialog-icon-container`
          }, icon) : null, vue.h("div", {
            class: `${mergedClsPrefix}-dialog__title`
          }, showIcon && mergedIconPlacement === "left" ? icon : null, resolveSlot(this.$slots.header, () => [render$1(title)])), vue.h("div", {
            class: [`${mergedClsPrefix}-dialog__content`, actionNode ? "" : `${mergedClsPrefix}-dialog__content--last`]
          }, resolveSlot(this.$slots.default, () => [render$1(content)])), actionNode);
        }
      });
      const dialogProviderInjectionKey = createInjectionKey("n-dialog-provider");
      const dialogApiInjectionKey = createInjectionKey("n-dialog-api");
      const dialogReactiveListInjectionKey = createInjectionKey("n-dialog-reactive-list");
      const self$6 = (vars) => {
        const {
          modalColor,
          textColor2,
          boxShadow3
        } = vars;
        return {
          color: modalColor,
          textColor: textColor2,
          boxShadow: boxShadow3
        };
      };
      const modalLight = createTheme({
        name: "Modal",
        common: commonLight,
        peers: {
          Scrollbar: scrollbarLight$1,
          Dialog: dialogLight$1,
          Card: cardLight$1
        },
        self: self$6
      });
      const modalLight$1 = modalLight;
      const presetProps = Object.assign(Object.assign({}, cardBaseProps), dialogProps);
      const presetPropsKeys = keysOf(presetProps);
      const NModalBodyWrapper = vue.defineComponent({
        name: "ModalBody",
        inheritAttrs: false,
        props: Object.assign(Object.assign({
          show: {
            type: Boolean,
            required: true
          },
          preset: String,
          displayDirective: {
            type: String,
            required: true
          },
          trapFocus: {
            type: Boolean,
            default: true
          },
          autoFocus: {
            type: Boolean,
            default: true
          },
          blockScroll: Boolean
        }, presetProps), {
          renderMask: Function,
          // events
          onClickoutside: Function,
          onBeforeLeave: {
            type: Function,
            required: true
          },
          onAfterLeave: {
            type: Function,
            required: true
          },
          onPositiveClick: {
            type: Function,
            required: true
          },
          onNegativeClick: {
            type: Function,
            required: true
          },
          onClose: {
            type: Function,
            required: true
          },
          onAfterEnter: Function,
          onEsc: Function
        }),
        setup(props) {
          const bodyRef = vue.ref(null);
          const scrollbarRef = vue.ref(null);
          const displayedRef = vue.ref(props.show);
          const transformOriginXRef = vue.ref(null);
          const transformOriginYRef = vue.ref(null);
          vue.watch(vue.toRef(props, "show"), (value) => {
            if (value)
              displayedRef.value = true;
          });
          useLockHtmlScroll(vue.computed(() => props.blockScroll && displayedRef.value));
          const NModal2 = vue.inject(modalInjectionKey);
          function styleTransformOrigin() {
            if (NModal2.transformOriginRef.value === "center") {
              return "";
            }
            const {
              value: transformOriginX
            } = transformOriginXRef;
            const {
              value: transformOriginY
            } = transformOriginYRef;
            if (transformOriginX === null || transformOriginY === null) {
              return "";
            } else if (scrollbarRef.value) {
              const scrollTop = scrollbarRef.value.containerScrollTop;
              return `${transformOriginX}px ${transformOriginY + scrollTop}px`;
            }
            return "";
          }
          function syncTransformOrigin(el) {
            if (NModal2.transformOriginRef.value === "center") {
              return;
            }
            const mousePosition = NModal2.getMousePosition();
            if (!mousePosition) {
              return;
            }
            if (!scrollbarRef.value)
              return;
            const scrollTop = scrollbarRef.value.containerScrollTop;
            const {
              offsetLeft,
              offsetTop
            } = el;
            if (mousePosition) {
              const top = mousePosition.y;
              const left = mousePosition.x;
              transformOriginXRef.value = -(offsetLeft - left);
              transformOriginYRef.value = -(offsetTop - top - scrollTop);
            }
            el.style.transformOrigin = styleTransformOrigin();
          }
          function handleEnter(el) {
            void vue.nextTick(() => {
              syncTransformOrigin(el);
            });
          }
          function handleBeforeLeave(el) {
            el.style.transformOrigin = styleTransformOrigin();
            props.onBeforeLeave();
          }
          function handleAfterLeave() {
            displayedRef.value = false;
            transformOriginXRef.value = null;
            transformOriginYRef.value = null;
            props.onAfterLeave();
          }
          function handleCloseClick() {
            const {
              onClose
            } = props;
            if (onClose) {
              onClose();
            }
          }
          function handleNegativeClick() {
            props.onNegativeClick();
          }
          function handlePositiveClick() {
            props.onPositiveClick();
          }
          const childNodeRef = vue.ref(null);
          vue.watch(childNodeRef, (node) => {
            if (node) {
              void vue.nextTick(() => {
                const el = node.el;
                if (el && bodyRef.value !== el) {
                  bodyRef.value = el;
                }
              });
            }
          });
          vue.provide(modalBodyInjectionKey, bodyRef);
          vue.provide(drawerBodyInjectionKey, null);
          vue.provide(popoverBodyInjectionKey, null);
          return {
            mergedTheme: NModal2.mergedThemeRef,
            appear: NModal2.appearRef,
            isMounted: NModal2.isMountedRef,
            mergedClsPrefix: NModal2.mergedClsPrefixRef,
            bodyRef,
            scrollbarRef,
            displayed: displayedRef,
            childNodeRef,
            handlePositiveClick,
            handleNegativeClick,
            handleCloseClick,
            handleAfterLeave,
            handleBeforeLeave,
            handleEnter
          };
        },
        render() {
          const {
            $slots,
            $attrs,
            handleEnter,
            handleAfterLeave,
            handleBeforeLeave,
            preset,
            mergedClsPrefix
          } = this;
          let childNode = null;
          if (!preset) {
            childNode = getFirstSlotVNode($slots);
            if (!childNode) {
              warn$2("modal", "default slot is empty");
              return;
            }
            childNode = vue.cloneVNode(childNode);
            childNode.props = vue.mergeProps({
              class: `${mergedClsPrefix}-modal`
            }, $attrs, childNode.props || {});
          }
          return this.displayDirective === "show" || this.displayed || this.show ? vue.withDirectives(vue.h("div", {
            role: "none",
            class: `${mergedClsPrefix}-modal-body-wrapper`
          }, vue.h(NScrollbar, {
            ref: "scrollbarRef",
            theme: this.mergedTheme.peers.Scrollbar,
            themeOverrides: this.mergedTheme.peerOverrides.Scrollbar,
            contentClass: `${mergedClsPrefix}-modal-scroll-content`
          }, {
            default: () => {
              var _a;
              return [(_a = this.renderMask) === null || _a === void 0 ? void 0 : _a.call(this), vue.h(FocusTrap, {
                disabled: !this.trapFocus,
                active: this.show,
                onEsc: this.onEsc,
                autoFocus: this.autoFocus
              }, {
                default: () => {
                  var _a2;
                  return vue.h(vue.Transition, {
                    name: "fade-in-scale-up-transition",
                    appear: (_a2 = this.appear) !== null && _a2 !== void 0 ? _a2 : this.isMounted,
                    onEnter: handleEnter,
                    onAfterEnter: this.onAfterEnter,
                    onAfterLeave: handleAfterLeave,
                    onBeforeLeave: handleBeforeLeave
                  }, {
                    default: () => {
                      const dirs = [[vue.vShow, this.show]];
                      const {
                        onClickoutside
                      } = this;
                      if (onClickoutside) {
                        dirs.push([clickoutside$1, this.onClickoutside, void 0, {
                          capture: true
                        }]);
                      }
                      return vue.withDirectives(this.preset === "confirm" || this.preset === "dialog" ? vue.h(NDialog, Object.assign({}, this.$attrs, {
                        class: [`${mergedClsPrefix}-modal`, this.$attrs.class],
                        ref: "bodyRef",
                        theme: this.mergedTheme.peers.Dialog,
                        themeOverrides: this.mergedTheme.peerOverrides.Dialog
                      }, keep(this.$props, dialogPropKeys), {
                        "aria-modal": "true"
                      }), $slots) : this.preset === "card" ? vue.h(NCard, Object.assign({}, this.$attrs, {
                        ref: "bodyRef",
                        class: [`${mergedClsPrefix}-modal`, this.$attrs.class],
                        theme: this.mergedTheme.peers.Card,
                        themeOverrides: this.mergedTheme.peerOverrides.Card
                      }, keep(this.$props, cardBasePropKeys), {
                        "aria-modal": "true",
                        role: "dialog"
                      }), $slots) : this.childNodeRef = childNode, dirs);
                    }
                  });
                }
              })];
            }
          })), [[vue.vShow, this.displayDirective === "if" || this.displayed || this.show]]) : null;
        }
      });
      const style$4 = c([cB("modal-container", `
 position: fixed;
 left: 0;
 top: 0;
 height: 0;
 width: 0;
 display: flex;
 `), cB("modal-mask", `
 position: fixed;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 background-color: rgba(0, 0, 0, .4);
 `, [fadeInTransition({
        enterDuration: ".25s",
        leaveDuration: ".25s",
        enterCubicBezier: "var(--n-bezier-ease-out)",
        leaveCubicBezier: "var(--n-bezier-ease-out)"
      })]), cB("modal-body-wrapper", `
 position: fixed;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 overflow: visible;
 `, [cB("modal-scroll-content", `
 min-height: 100%;
 display: flex;
 position: relative;
 `)]), cB("modal", `
 position: relative;
 align-self: center;
 color: var(--n-text-color);
 margin: auto;
 box-shadow: var(--n-box-shadow);
 `, [fadeInScaleUpTransition({
        duration: ".25s",
        enterScale: ".5"
      })])]);
      const modalProps = Object.assign(Object.assign(Object.assign(Object.assign({}, useTheme.props), {
        show: Boolean,
        unstableShowMask: {
          type: Boolean,
          default: true
        },
        maskClosable: {
          type: Boolean,
          default: true
        },
        preset: String,
        to: [String, Object],
        displayDirective: {
          type: String,
          default: "if"
        },
        transformOrigin: {
          type: String,
          default: "mouse"
        },
        zIndex: Number,
        autoFocus: {
          type: Boolean,
          default: true
        },
        trapFocus: {
          type: Boolean,
          default: true
        },
        closeOnEsc: {
          type: Boolean,
          default: true
        },
        blockScroll: {
          type: Boolean,
          default: true
        }
      }), presetProps), {
        // events
        onEsc: Function,
        "onUpdate:show": [Function, Array],
        onUpdateShow: [Function, Array],
        onAfterEnter: Function,
        onBeforeLeave: Function,
        onAfterLeave: Function,
        onClose: Function,
        onPositiveClick: Function,
        onNegativeClick: Function,
        onMaskClick: Function,
        // private
        internalDialog: Boolean,
        internalAppear: {
          type: Boolean,
          default: void 0
        },
        // deprecated
        overlayStyle: [String, Object],
        onBeforeHide: Function,
        onAfterHide: Function,
        onHide: Function
      });
      const NModal = vue.defineComponent({
        name: "Modal",
        inheritAttrs: false,
        props: modalProps,
        setup(props) {
          const containerRef = vue.ref(null);
          const {
            mergedClsPrefixRef,
            namespaceRef,
            inlineThemeDisabled
          } = useConfig(props);
          const themeRef = useTheme("Modal", "-modal", style$4, modalLight$1, props, mergedClsPrefixRef);
          const clickedRef = useClicked(64);
          const clickedPositionRef = useClickPosition();
          const isMountedRef = isMounted();
          const NDialogProvider2 = props.internalDialog ? vue.inject(dialogProviderInjectionKey, null) : null;
          const isComposingRef2 = useIsComposing();
          function doUpdateShow(show) {
            const {
              onUpdateShow,
              "onUpdate:show": _onUpdateShow,
              onHide
            } = props;
            if (onUpdateShow)
              call$1(onUpdateShow, show);
            if (_onUpdateShow)
              call$1(_onUpdateShow, show);
            if (onHide && !show)
              onHide(show);
          }
          function handleCloseClick() {
            const {
              onClose
            } = props;
            if (onClose) {
              void Promise.resolve(onClose()).then((value) => {
                if (value === false)
                  return;
                doUpdateShow(false);
              });
            } else {
              doUpdateShow(false);
            }
          }
          function handlePositiveClick() {
            const {
              onPositiveClick
            } = props;
            if (onPositiveClick) {
              void Promise.resolve(onPositiveClick()).then((value) => {
                if (value === false)
                  return;
                doUpdateShow(false);
              });
            } else {
              doUpdateShow(false);
            }
          }
          function handleNegativeClick() {
            const {
              onNegativeClick
            } = props;
            if (onNegativeClick) {
              void Promise.resolve(onNegativeClick()).then((value) => {
                if (value === false)
                  return;
                doUpdateShow(false);
              });
            } else {
              doUpdateShow(false);
            }
          }
          function handleBeforeLeave() {
            const {
              onBeforeLeave,
              onBeforeHide
            } = props;
            if (onBeforeLeave)
              call$1(onBeforeLeave);
            if (onBeforeHide)
              onBeforeHide();
          }
          function handleAfterLeave() {
            const {
              onAfterLeave,
              onAfterHide
            } = props;
            if (onAfterLeave)
              call$1(onAfterLeave);
            if (onAfterHide)
              onAfterHide();
          }
          function handleClickoutside(e) {
            var _a;
            const {
              onMaskClick
            } = props;
            if (onMaskClick) {
              onMaskClick(e);
            }
            if (props.maskClosable) {
              if ((_a = containerRef.value) === null || _a === void 0 ? void 0 : _a.contains(getPreciseEventTarget(e))) {
                doUpdateShow(false);
              }
            }
          }
          function handleEsc(e) {
            var _a;
            (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props);
            if (props.show && props.closeOnEsc && eventEffectNotPerformed(e)) {
              !isComposingRef2.value && doUpdateShow(false);
            }
          }
          vue.provide(modalInjectionKey, {
            getMousePosition: () => {
              if (NDialogProvider2) {
                const {
                  clickedRef: clickedRef2,
                  clickPositionRef
                } = NDialogProvider2;
                if (clickedRef2.value && clickPositionRef.value) {
                  return clickPositionRef.value;
                }
              }
              if (clickedRef.value) {
                return clickedPositionRef.value;
              }
              return null;
            },
            mergedClsPrefixRef,
            mergedThemeRef: themeRef,
            isMountedRef,
            appearRef: vue.toRef(props, "internalAppear"),
            transformOriginRef: vue.toRef(props, "transformOrigin")
          });
          const cssVarsRef = vue.computed(() => {
            const {
              common: {
                cubicBezierEaseOut: cubicBezierEaseOut2
              },
              self: {
                boxShadow,
                color,
                textColor
              }
            } = themeRef.value;
            return {
              "--n-bezier-ease-out": cubicBezierEaseOut2,
              "--n-box-shadow": boxShadow,
              "--n-color": color,
              "--n-text-color": textColor
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("theme-class", void 0, cssVarsRef, props) : void 0;
          return {
            mergedClsPrefix: mergedClsPrefixRef,
            namespace: namespaceRef,
            isMounted: isMountedRef,
            containerRef,
            presetProps: vue.computed(() => {
              const pickedProps = keep(props, presetPropsKeys);
              return pickedProps;
            }),
            handleEsc,
            handleAfterLeave,
            handleClickoutside,
            handleBeforeLeave,
            doUpdateShow,
            handleNegativeClick,
            handlePositiveClick,
            handleCloseClick,
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          const {
            mergedClsPrefix
          } = this;
          return vue.h(LazyTeleport, {
            to: this.to,
            show: this.show
          }, {
            default: () => {
              var _a;
              (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
              const {
                unstableShowMask
              } = this;
              return vue.withDirectives(vue.h("div", {
                role: "none",
                ref: "containerRef",
                class: [`${mergedClsPrefix}-modal-container`, this.themeClass, this.namespace],
                style: this.cssVars
              }, vue.h(NModalBodyWrapper, Object.assign({
                style: this.overlayStyle
              }, this.$attrs, {
                ref: "bodyWrapper",
                displayDirective: this.displayDirective,
                show: this.show,
                preset: this.preset,
                autoFocus: this.autoFocus,
                trapFocus: this.trapFocus,
                blockScroll: this.blockScroll
              }, this.presetProps, {
                onEsc: this.handleEsc,
                onClose: this.handleCloseClick,
                onNegativeClick: this.handleNegativeClick,
                onPositiveClick: this.handlePositiveClick,
                onBeforeLeave: this.handleBeforeLeave,
                onAfterEnter: this.onAfterEnter,
                onAfterLeave: this.handleAfterLeave,
                onClickoutside: unstableShowMask ? void 0 : this.handleClickoutside,
                renderMask: unstableShowMask ? () => {
                  var _a2;
                  return vue.h(vue.Transition, {
                    name: "fade-in-transition",
                    key: "mask",
                    appear: (_a2 = this.internalAppear) !== null && _a2 !== void 0 ? _a2 : this.isMounted
                  }, {
                    default: () => {
                      return this.show ? vue.h("div", {
                        "aria-hidden": true,
                        ref: "containerRef",
                        class: `${mergedClsPrefix}-modal-mask`,
                        onClick: this.handleClickoutside
                      }) : null;
                    }
                  });
                } : void 0
              }), this.$slots)), [[zindexable$1, {
                zIndex: this.zIndex,
                enabled: this.show
              }]]);
            }
          });
        }
      });
      const exposedDialogEnvProps = Object.assign(Object.assign({}, dialogProps), {
        onAfterEnter: Function,
        onAfterLeave: Function,
        transformOrigin: String,
        blockScroll: {
          type: Boolean,
          default: true
        },
        closeOnEsc: {
          type: Boolean,
          default: true
        },
        onEsc: Function,
        autoFocus: {
          type: Boolean,
          default: true
        },
        internalStyle: [String, Object],
        maskClosable: {
          type: Boolean,
          default: true
        },
        onPositiveClick: Function,
        onNegativeClick: Function,
        onClose: Function,
        onMaskClick: Function
      });
      const NDialogEnvironment = vue.defineComponent({
        name: "DialogEnvironment",
        props: Object.assign(Object.assign({}, exposedDialogEnvProps), {
          internalKey: {
            type: String,
            required: true
          },
          to: [String, Object],
          // private
          onInternalAfterLeave: {
            type: Function,
            required: true
          }
        }),
        setup(props) {
          const showRef = vue.ref(true);
          function handleAfterLeave() {
            const {
              onInternalAfterLeave,
              internalKey,
              onAfterLeave
            } = props;
            if (onInternalAfterLeave)
              onInternalAfterLeave(internalKey);
            if (onAfterLeave)
              onAfterLeave();
          }
          function handlePositiveClick(e) {
            const {
              onPositiveClick
            } = props;
            if (onPositiveClick) {
              void Promise.resolve(onPositiveClick(e)).then((result) => {
                if (result === false)
                  return;
                hide();
              });
            } else {
              hide();
            }
          }
          function handleNegativeClick(e) {
            const {
              onNegativeClick
            } = props;
            if (onNegativeClick) {
              void Promise.resolve(onNegativeClick(e)).then((result) => {
                if (result === false)
                  return;
                hide();
              });
            } else {
              hide();
            }
          }
          function handleCloseClick() {
            const {
              onClose
            } = props;
            if (onClose) {
              void Promise.resolve(onClose()).then((result) => {
                if (result === false)
                  return;
                hide();
              });
            } else {
              hide();
            }
          }
          function handleMaskClick(e) {
            const {
              onMaskClick,
              maskClosable
            } = props;
            if (onMaskClick) {
              onMaskClick(e);
              maskClosable && hide();
            }
          }
          function handleEsc() {
            const {
              onEsc
            } = props;
            if (onEsc) {
              onEsc();
            }
          }
          function hide() {
            showRef.value = false;
          }
          function handleUpdateShow(value) {
            showRef.value = value;
          }
          return {
            show: showRef,
            hide,
            handleUpdateShow,
            handleAfterLeave,
            handleCloseClick,
            handleNegativeClick,
            handlePositiveClick,
            handleMaskClick,
            handleEsc
          };
        },
        render() {
          const {
            handlePositiveClick,
            handleUpdateShow,
            handleNegativeClick,
            handleCloseClick,
            handleAfterLeave,
            handleMaskClick,
            handleEsc,
            to,
            maskClosable,
            show
          } = this;
          return vue.h(NModal, {
            show,
            onUpdateShow: handleUpdateShow,
            onMaskClick: handleMaskClick,
            onEsc: handleEsc,
            to,
            maskClosable,
            onAfterEnter: this.onAfterEnter,
            onAfterLeave: handleAfterLeave,
            closeOnEsc: this.closeOnEsc,
            blockScroll: this.blockScroll,
            autoFocus: this.autoFocus,
            transformOrigin: this.transformOrigin,
            internalAppear: true,
            internalDialog: true
          }, {
            default: () => vue.h(NDialog, Object.assign({}, keep(this.$props, dialogPropKeys), {
              style: this.internalStyle,
              onClose: handleCloseClick,
              onNegativeClick: handleNegativeClick,
              onPositiveClick: handlePositiveClick
            }))
          });
        }
      });
      const dialogProviderProps = {
        injectionKey: String,
        to: [String, Object]
      };
      const NDialogProvider = vue.defineComponent({
        name: "DialogProvider",
        props: dialogProviderProps,
        setup() {
          const dialogListRef = vue.ref([]);
          const dialogInstRefs = {};
          function create(options = {}) {
            const key = createId();
            const dialogReactive = vue.reactive(Object.assign(Object.assign({}, options), {
              key,
              destroy: () => {
                dialogInstRefs[`n-dialog-${key}`].hide();
              }
            }));
            dialogListRef.value.push(dialogReactive);
            return dialogReactive;
          }
          const typedApi = ["info", "success", "warning", "error"].map((type) => (options) => {
            return create(Object.assign(Object.assign({}, options), {
              type
            }));
          });
          function handleAfterLeave(key) {
            const {
              value: dialogList
            } = dialogListRef;
            dialogList.splice(dialogList.findIndex((dialog) => dialog.key === key), 1);
          }
          function destroyAll() {
            Object.values(dialogInstRefs).forEach((dialogInstRef) => {
              dialogInstRef.hide();
            });
          }
          const api2 = {
            create,
            destroyAll,
            info: typedApi[0],
            success: typedApi[1],
            warning: typedApi[2],
            error: typedApi[3]
          };
          vue.provide(dialogApiInjectionKey, api2);
          vue.provide(dialogProviderInjectionKey, {
            clickedRef: useClicked(64),
            clickPositionRef: useClickPosition()
          });
          vue.provide(dialogReactiveListInjectionKey, dialogListRef);
          return Object.assign(Object.assign({}, api2), {
            dialogList: dialogListRef,
            dialogInstRefs,
            handleAfterLeave
          });
        },
        render() {
          var _a, _b;
          return vue.h(vue.Fragment, null, [this.dialogList.map((dialog) => vue.h(NDialogEnvironment, omit(dialog, ["destroy", "style"], {
            internalStyle: dialog.style,
            to: this.to,
            ref: (inst) => {
              if (inst === null) {
                delete this.dialogInstRefs[`n-dialog-${dialog.key}`];
              } else {
                this.dialogInstRefs[`n-dialog-${dialog.key}`] = inst;
              }
            },
            internalKey: dialog.key,
            onInternalAfterLeave: this.handleAfterLeave
          }))), (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)]);
        }
      });
      function useDialog() {
        const dialog = vue.inject(dialogApiInjectionKey, null);
        if (dialog === null) {
          throwError("use-dialog", "No outer <n-dialog-provider /> founded.");
        }
        return dialog;
      }
      const commonVars$1 = {
        gapSmall: "4px 8px",
        gapMedium: "8px 12px",
        gapLarge: "12px 16px"
      };
      const self$5 = () => {
        return commonVars$1;
      };
      const spaceLight = {
        name: "Space",
        self: self$5
      };
      const spaceLight$1 = spaceLight;
      let supportFlexGap;
      const ensureSupportFlexGap = () => {
        if (!isBrowser$2)
          return true;
        if (supportFlexGap === void 0) {
          const flex = document.createElement("div");
          flex.style.display = "flex";
          flex.style.flexDirection = "column";
          flex.style.rowGap = "1px";
          flex.appendChild(document.createElement("div"));
          flex.appendChild(document.createElement("div"));
          document.body.appendChild(flex);
          const isSupported = flex.scrollHeight === 1;
          document.body.removeChild(flex);
          return supportFlexGap = isSupported;
        }
        return supportFlexGap;
      };
      const spaceProps = Object.assign(Object.assign({}, useTheme.props), {
        align: String,
        justify: {
          type: String,
          default: "start"
        },
        inline: Boolean,
        vertical: Boolean,
        reverse: Boolean,
        size: {
          type: [String, Number, Array],
          default: "medium"
        },
        wrapItem: {
          type: Boolean,
          default: true
        },
        itemClass: String,
        itemStyle: [String, Object],
        wrap: {
          type: Boolean,
          default: true
        },
        // internal
        internalUseGap: {
          type: Boolean,
          default: void 0
        }
      });
      const NSpace = vue.defineComponent({
        name: "Space",
        props: spaceProps,
        setup(props) {
          const {
            mergedClsPrefixRef,
            mergedRtlRef
          } = useConfig(props);
          const themeRef = useTheme("Space", "-space", void 0, spaceLight$1, props, mergedClsPrefixRef);
          const rtlEnabledRef = useRtl("Space", mergedRtlRef, mergedClsPrefixRef);
          return {
            useGap: ensureSupportFlexGap(),
            rtlEnabled: rtlEnabledRef,
            mergedClsPrefix: mergedClsPrefixRef,
            margin: vue.computed(() => {
              const {
                size: size2
              } = props;
              if (Array.isArray(size2)) {
                return {
                  horizontal: size2[0],
                  vertical: size2[1]
                };
              }
              if (typeof size2 === "number") {
                return {
                  horizontal: size2,
                  vertical: size2
                };
              }
              const {
                self: {
                  [createKey("gap", size2)]: gap
                }
              } = themeRef.value;
              const {
                row,
                col
              } = getGap(gap);
              return {
                horizontal: depx(col),
                vertical: depx(row)
              };
            })
          };
        },
        render() {
          const {
            vertical,
            reverse,
            align,
            inline,
            justify,
            itemClass,
            itemStyle,
            margin,
            wrap,
            mergedClsPrefix,
            rtlEnabled,
            useGap,
            wrapItem,
            internalUseGap
          } = this;
          const children = flatten(getSlot$1(this), false);
          if (!children.length)
            return null;
          const horizontalMargin = `${margin.horizontal}px`;
          const semiHorizontalMargin = `${margin.horizontal / 2}px`;
          const verticalMargin = `${margin.vertical}px`;
          const semiVerticalMargin = `${margin.vertical / 2}px`;
          const lastIndex = children.length - 1;
          const isJustifySpace = justify.startsWith("space-");
          return vue.h("div", {
            role: "none",
            class: [`${mergedClsPrefix}-space`, rtlEnabled && `${mergedClsPrefix}-space--rtl`],
            style: {
              display: inline ? "inline-flex" : "flex",
              flexDirection: (() => {
                if (vertical && !reverse)
                  return "column";
                if (vertical && reverse)
                  return "column-reverse";
                if (!vertical && reverse)
                  return "row-reverse";
                else
                  return "row";
              })(),
              justifyContent: ["start", "end"].includes(justify) ? "flex-" + justify : justify,
              flexWrap: !wrap || vertical ? "nowrap" : "wrap",
              marginTop: useGap || vertical ? "" : `-${semiVerticalMargin}`,
              marginBottom: useGap || vertical ? "" : `-${semiVerticalMargin}`,
              alignItems: align,
              gap: useGap ? `${margin.vertical}px ${margin.horizontal}px` : ""
            }
          }, !wrapItem && (useGap || internalUseGap) ? children : children.map((child, index) => child.type === vue.Comment ? child : vue.h("div", {
            role: "none",
            class: itemClass,
            style: [itemStyle, {
              maxWidth: "100%"
            }, useGap ? "" : vertical ? {
              marginBottom: index !== lastIndex ? verticalMargin : ""
            } : rtlEnabled ? {
              marginLeft: isJustifySpace ? justify === "space-between" && index === lastIndex ? "" : semiHorizontalMargin : index !== lastIndex ? horizontalMargin : "",
              marginRight: isJustifySpace ? justify === "space-between" && index === 0 ? "" : semiHorizontalMargin : "",
              paddingTop: semiVerticalMargin,
              paddingBottom: semiVerticalMargin
            } : {
              marginRight: isJustifySpace ? justify === "space-between" && index === lastIndex ? "" : semiHorizontalMargin : index !== lastIndex ? horizontalMargin : "",
              marginLeft: isJustifySpace ? justify === "space-between" && index === 0 ? "" : semiHorizontalMargin : "",
              paddingTop: semiVerticalMargin,
              paddingBottom: semiVerticalMargin
            }]
          }, child)));
        }
      });
      const commonVars = {
        closeMargin: "16px 12px",
        closeSize: "20px",
        closeIconSize: "16px",
        width: "365px",
        padding: "16px",
        titleFontSize: "16px",
        metaFontSize: "12px",
        descriptionFontSize: "12px"
      };
      const self$4 = (vars) => {
        const {
          textColor2,
          successColor,
          infoColor,
          warningColor,
          errorColor,
          popoverColor,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          closeColorHover,
          closeColorPressed,
          textColor1,
          textColor3,
          borderRadius,
          fontWeightStrong,
          boxShadow2,
          lineHeight: lineHeight2,
          fontSize: fontSize2
        } = vars;
        return Object.assign(Object.assign({}, commonVars), {
          borderRadius,
          lineHeight: lineHeight2,
          fontSize: fontSize2,
          headerFontWeight: fontWeightStrong,
          iconColor: textColor2,
          iconColorSuccess: successColor,
          iconColorInfo: infoColor,
          iconColorWarning: warningColor,
          iconColorError: errorColor,
          color: popoverColor,
          textColor: textColor2,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          closeBorderRadius: borderRadius,
          closeColorHover,
          closeColorPressed,
          headerTextColor: textColor1,
          descriptionTextColor: textColor3,
          actionTextColor: textColor2,
          boxShadow: boxShadow2
        });
      };
      const notificationLight = createTheme({
        name: "Notification",
        common: commonLight,
        peers: {
          Scrollbar: scrollbarLight$1
        },
        self: self$4
      });
      const notificationLight$1 = notificationLight;
      const commonVariables = {
        margin: "0 0 8px 0",
        padding: "10px 20px",
        maxWidth: "720px",
        minWidth: "420px",
        iconMargin: "0 10px 0 0",
        closeMargin: "0 0 0 10px",
        closeSize: "20px",
        closeIconSize: "16px",
        iconSize: "20px",
        fontSize: "14px"
      };
      const self$3 = (vars) => {
        const {
          textColor2,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          infoColor,
          successColor,
          errorColor,
          warningColor,
          popoverColor,
          boxShadow2,
          primaryColor,
          lineHeight: lineHeight2,
          borderRadius,
          closeColorHover,
          closeColorPressed
        } = vars;
        return Object.assign(Object.assign({}, commonVariables), {
          closeBorderRadius: borderRadius,
          textColor: textColor2,
          textColorInfo: textColor2,
          textColorSuccess: textColor2,
          textColorError: textColor2,
          textColorWarning: textColor2,
          textColorLoading: textColor2,
          color: popoverColor,
          colorInfo: popoverColor,
          colorSuccess: popoverColor,
          colorError: popoverColor,
          colorWarning: popoverColor,
          colorLoading: popoverColor,
          boxShadow: boxShadow2,
          boxShadowInfo: boxShadow2,
          boxShadowSuccess: boxShadow2,
          boxShadowError: boxShadow2,
          boxShadowWarning: boxShadow2,
          boxShadowLoading: boxShadow2,
          iconColor: textColor2,
          iconColorInfo: infoColor,
          iconColorSuccess: successColor,
          iconColorWarning: warningColor,
          iconColorError: errorColor,
          iconColorLoading: primaryColor,
          closeColorHover,
          closeColorPressed,
          closeIconColor,
          closeIconColorHover,
          closeIconColorPressed,
          closeColorHoverInfo: closeColorHover,
          closeColorPressedInfo: closeColorPressed,
          closeIconColorInfo: closeIconColor,
          closeIconColorHoverInfo: closeIconColorHover,
          closeIconColorPressedInfo: closeIconColorPressed,
          closeColorHoverSuccess: closeColorHover,
          closeColorPressedSuccess: closeColorPressed,
          closeIconColorSuccess: closeIconColor,
          closeIconColorHoverSuccess: closeIconColorHover,
          closeIconColorPressedSuccess: closeIconColorPressed,
          closeColorHoverError: closeColorHover,
          closeColorPressedError: closeColorPressed,
          closeIconColorError: closeIconColor,
          closeIconColorHoverError: closeIconColorHover,
          closeIconColorPressedError: closeIconColorPressed,
          closeColorHoverWarning: closeColorHover,
          closeColorPressedWarning: closeColorPressed,
          closeIconColorWarning: closeIconColor,
          closeIconColorHoverWarning: closeIconColorHover,
          closeIconColorPressedWarning: closeIconColorPressed,
          closeColorHoverLoading: closeColorHover,
          closeColorPressedLoading: closeColorPressed,
          closeIconColorLoading: closeIconColor,
          closeIconColorHoverLoading: closeIconColorHover,
          closeIconColorPressedLoading: closeIconColorPressed,
          loadingColor: primaryColor,
          lineHeight: lineHeight2,
          borderRadius
        });
      };
      const messageLight = {
        name: "Message",
        common: commonLight,
        self: self$3
      };
      const messageLight$1 = messageLight;
      const self$2 = (vars) => {
        const {
          primaryColor,
          errorColor
        } = vars;
        return {
          colorError: errorColor,
          colorLoading: primaryColor,
          height: "2px"
        };
      };
      const loadingBarLight = {
        name: "LoadingBar",
        common: commonLight,
        self: self$2
      };
      const loadingBarLight$1 = loadingBarLight;
      const self$1 = (vars) => {
        const {
          opacityDisabled,
          heightTiny,
          heightSmall,
          heightMedium,
          heightLarge,
          heightHuge,
          primaryColor,
          fontSize: fontSize2
        } = vars;
        return {
          fontSize: fontSize2,
          textColor: primaryColor,
          sizeTiny: heightTiny,
          sizeSmall: heightSmall,
          sizeMedium: heightMedium,
          sizeLarge: heightLarge,
          sizeHuge: heightHuge,
          color: primaryColor,
          opacitySpinning: opacityDisabled
        };
      };
      const spinLight = {
        name: "Spin",
        common: commonLight,
        self: self$1
      };
      const spinLight$1 = spinLight;
      const loadingBarProviderInjectionKey = createInjectionKey("n-loading-bar");
      const loadingBarApiInjectionKey = createInjectionKey("n-loading-bar-api");
      const style$3 = cB("loading-bar-container", `
 z-index: 5999;
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 height: 2px;
`, [fadeInTransition({
        enterDuration: "0.3s",
        leaveDuration: "0.8s"
      }), cB("loading-bar", `
 width: 100%;
 transition:
 max-width 4s linear,
 background .2s linear;
 height: var(--n-height);
 `, [cM("starting", `
 background: var(--n-color-loading);
 `), cM("finishing", `
 background: var(--n-color-loading);
 transition:
 max-width .2s linear,
 background .2s linear;
 `), cM("error", `
 background: var(--n-color-error);
 transition:
 max-width .2s linear,
 background .2s linear;
 `)])]);
      var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
        function adopt(value) {
          return value instanceof P ? value : new P(function(resolve) {
            resolve(value);
          });
        }
        return new (P || (P = Promise))(function(resolve, reject) {
          function fulfilled(value) {
            try {
              step(generator.next(value));
            } catch (e) {
              reject(e);
            }
          }
          function rejected(value) {
            try {
              step(generator["throw"](value));
            } catch (e) {
              reject(e);
            }
          }
          function step(result) {
            result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
          }
          step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
      };
      function createClassName(status, clsPrefix) {
        return `${clsPrefix}-loading-bar ${clsPrefix}-loading-bar--${status}`;
      }
      const NLoadingBar = vue.defineComponent({
        name: "LoadingBar",
        props: {
          containerClass: String,
          containerStyle: [String, Object]
        },
        setup() {
          const {
            inlineThemeDisabled
          } = useConfig();
          const {
            props: providerProps,
            mergedClsPrefixRef
            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
          } = vue.inject(loadingBarProviderInjectionKey);
          const loadingBarRef = vue.ref(null);
          const enteringRef = vue.ref(false);
          const startedRef = vue.ref(false);
          const loadingRef = vue.ref(false);
          const transitionDisabledRef = vue.ref(false);
          let finishing = false;
          const erroringRef = vue.ref(false);
          const mergedLoadingBarStyle = vue.computed(() => {
            const {
              loadingBarStyle
            } = providerProps;
            if (!loadingBarStyle)
              return "";
            return loadingBarStyle[erroringRef.value ? "error" : "loading"];
          });
          function init2() {
            return __awaiter(this, void 0, void 0, function* () {
              enteringRef.value = false;
              loadingRef.value = false;
              finishing = false;
              erroringRef.value = false;
              transitionDisabledRef.value = true;
              yield vue.nextTick();
              transitionDisabledRef.value = false;
            });
          }
          function start(fromProgress = 0, toProgress = 80, status = "starting") {
            return __awaiter(this, void 0, void 0, function* () {
              startedRef.value = true;
              yield init2();
              if (finishing)
                return;
              loadingRef.value = true;
              yield vue.nextTick();
              const el = loadingBarRef.value;
              if (!el)
                return;
              el.style.maxWidth = `${fromProgress}%`;
              el.style.transition = "none";
              void el.offsetWidth;
              el.className = createClassName(status, mergedClsPrefixRef.value);
              el.style.transition = "";
              el.style.maxWidth = `${toProgress}%`;
            });
          }
          function finish() {
            return __awaiter(this, void 0, void 0, function* () {
              if (finishing || erroringRef.value)
                return;
              if (startedRef.value) {
                yield vue.nextTick();
              }
              finishing = true;
              const el = loadingBarRef.value;
              if (!el)
                return;
              el.className = createClassName("finishing", mergedClsPrefixRef.value);
              el.style.maxWidth = "100%";
              void el.offsetWidth;
              loadingRef.value = false;
            });
          }
          function error() {
            if (finishing || erroringRef.value)
              return;
            if (!loadingRef.value) {
              void start(100, 100, "error").then(() => {
                erroringRef.value = true;
                const el = loadingBarRef.value;
                if (!el)
                  return;
                el.className = createClassName("error", mergedClsPrefixRef.value);
                void el.offsetWidth;
                loadingRef.value = false;
              });
            } else {
              erroringRef.value = true;
              const el = loadingBarRef.value;
              if (!el)
                return;
              el.className = createClassName("error", mergedClsPrefixRef.value);
              el.style.maxWidth = "100%";
              void el.offsetWidth;
              loadingRef.value = false;
            }
          }
          function handleEnter() {
            enteringRef.value = true;
          }
          function handleAfterEnter() {
            enteringRef.value = false;
          }
          function handleAfterLeave() {
            return __awaiter(this, void 0, void 0, function* () {
              yield init2();
            });
          }
          const themeRef = useTheme("LoadingBar", "-loading-bar", style$3, loadingBarLight$1, providerProps, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              self: {
                height,
                colorError,
                colorLoading
              }
            } = themeRef.value;
            return {
              "--n-height": height,
              "--n-color-loading": colorLoading,
              "--n-color-error": colorError
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("loading-bar", void 0, cssVarsRef, providerProps) : void 0;
          return {
            mergedClsPrefix: mergedClsPrefixRef,
            loadingBarRef,
            started: startedRef,
            loading: loadingRef,
            entering: enteringRef,
            transitionDisabled: transitionDisabledRef,
            start,
            error,
            finish,
            handleEnter,
            handleAfterEnter,
            handleAfterLeave,
            mergedLoadingBarStyle,
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          if (!this.started)
            return null;
          const {
            mergedClsPrefix
          } = this;
          return vue.h(vue.Transition, {
            name: "fade-in-transition",
            appear: true,
            onEnter: this.handleEnter,
            onAfterEnter: this.handleAfterEnter,
            // eslint-disable-next-line @typescript-eslint/no-misused-promises
            onAfterLeave: this.handleAfterLeave,
            css: !this.transitionDisabled
          }, {
            default: () => {
              var _a;
              (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
              return vue.withDirectives(vue.h("div", {
                class: [`${mergedClsPrefix}-loading-bar-container`, this.themeClass, this.containerClass],
                style: this.containerStyle
              }, vue.h("div", {
                ref: "loadingBarRef",
                class: [`${mergedClsPrefix}-loading-bar`],
                style: [this.cssVars, this.mergedLoadingBarStyle]
              })), [[vue.vShow, this.loading || !this.loading && this.entering]]);
            }
          });
        }
      });
      const loadingBarProviderProps = Object.assign(Object.assign({}, useTheme.props), {
        to: {
          type: [String, Object, Boolean],
          default: void 0
        },
        containerClass: String,
        containerStyle: [String, Object],
        loadingBarStyle: {
          type: Object
        }
      });
      const NLoadingBarProvider = vue.defineComponent({
        name: "LoadingBarProvider",
        props: loadingBarProviderProps,
        setup(props) {
          const isMountedRef = isMounted();
          const loadingBarRef = vue.ref(null);
          const methods = {
            start() {
              var _a;
              if (isMountedRef.value) {
                (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.start();
              } else {
                void vue.nextTick(() => {
                  var _a2;
                  (_a2 = loadingBarRef.value) === null || _a2 === void 0 ? void 0 : _a2.start();
                });
              }
            },
            error() {
              var _a;
              if (isMountedRef.value) {
                (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.error();
              } else {
                void vue.nextTick(() => {
                  var _a2;
                  (_a2 = loadingBarRef.value) === null || _a2 === void 0 ? void 0 : _a2.error();
                });
              }
            },
            finish() {
              var _a;
              if (isMountedRef.value) {
                (_a = loadingBarRef.value) === null || _a === void 0 ? void 0 : _a.finish();
              } else {
                void vue.nextTick(() => {
                  var _a2;
                  (_a2 = loadingBarRef.value) === null || _a2 === void 0 ? void 0 : _a2.finish();
                });
              }
            }
          };
          const {
            mergedClsPrefixRef
          } = useConfig(props);
          vue.provide(loadingBarApiInjectionKey, methods);
          vue.provide(loadingBarProviderInjectionKey, {
            props,
            mergedClsPrefixRef
          });
          return Object.assign(methods, {
            loadingBarRef
          });
        },
        render() {
          var _a, _b;
          return vue.h(vue.Fragment, null, vue.h(vue.Teleport, {
            disabled: this.to === false,
            to: this.to || "body"
          }, vue.h(NLoadingBar, {
            ref: "loadingBarRef",
            containerStyle: this.containerStyle,
            containerClass: this.containerClass
          })), (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));
        }
      });
      function useLoadingBar() {
        const loadingBar = vue.inject(loadingBarApiInjectionKey, null);
        if (loadingBar === null) {
          throwError("use-loading-bar", "No outer <n-loading-bar-provider /> founded.");
        }
        return loadingBar;
      }
      const messageProps = {
        icon: Function,
        type: {
          type: String,
          default: "info"
        },
        content: [String, Number, Function],
        showIcon: {
          type: Boolean,
          default: true
        },
        closable: Boolean,
        keepAliveOnHover: Boolean,
        onClose: Function,
        onMouseenter: Function,
        onMouseleave: Function
      };
      const messageApiInjectionKey = createInjectionKey("n-message-api");
      const messageProviderInjectionKey = createInjectionKey("n-message-provider");
      const style$2 = c([cB("message-wrapper", `
 margin: var(--n-margin);
 z-index: 0;
 transform-origin: top center;
 display: flex;
 `, [fadeInHeightExpandTransition({
        overflow: "visible",
        originalTransition: "transform .3s var(--n-bezier)",
        enterToProps: {
          transform: "scale(1)"
        },
        leaveToProps: {
          transform: "scale(0.85)"
        }
      })]), cB("message", `
 box-sizing: border-box;
 display: flex;
 align-items: center;
 transition:
 color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 transform .3s var(--n-bezier),
 margin-bottom .3s var(--n-bezier);
 padding: var(--n-padding);
 border-radius: var(--n-border-radius);
 flex-wrap: nowrap;
 overflow: hidden;
 max-width: var(--n-max-width);
 color: var(--n-text-color);
 background-color: var(--n-color);
 box-shadow: var(--n-box-shadow);
 `, [cE("content", `
 display: inline-block;
 line-height: var(--n-line-height);
 font-size: var(--n-font-size);
 `), cE("icon", `
 position: relative;
 margin: var(--n-icon-margin);
 height: var(--n-icon-size);
 width: var(--n-icon-size);
 font-size: var(--n-icon-size);
 flex-shrink: 0;
 `, [["default", "info", "success", "warning", "error", "loading"].map((type) => cM(`${type}-type`, [c("> *", `
 color: var(--n-icon-color-${type});
 transition: color .3s var(--n-bezier);
 `)])), c("> *", `
 position: absolute;
 left: 0;
 top: 0;
 right: 0;
 bottom: 0;
 `, [iconSwitchTransition()])]), cE("close", `
 margin: var(--n-close-margin);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 flex-shrink: 0;
 `, [c("&:hover", `
 color: var(--n-close-icon-color-hover);
 `), c("&:active", `
 color: var(--n-close-icon-color-pressed);
 `)])]), cB("message-container", `
 z-index: 6000;
 position: fixed;
 height: 0;
 overflow: visible;
 display: flex;
 flex-direction: column;
 align-items: center;
 `, [cM("top", `
 top: 12px;
 left: 0;
 right: 0;
 `), cM("top-left", `
 top: 12px;
 left: 12px;
 right: 0;
 align-items: flex-start;
 `), cM("top-right", `
 top: 12px;
 left: 0;
 right: 12px;
 align-items: flex-end;
 `), cM("bottom", `
 bottom: 4px;
 left: 0;
 right: 0;
 justify-content: flex-end;
 `), cM("bottom-left", `
 bottom: 4px;
 left: 12px;
 right: 0;
 justify-content: flex-end;
 align-items: flex-start;
 `), cM("bottom-right", `
 bottom: 4px;
 left: 0;
 right: 12px;
 justify-content: flex-end;
 align-items: flex-end;
 `)])]);
      const iconRenderMap$1 = {
        info: () => vue.h(InfoIcon, null),
        success: () => vue.h(SuccessIcon, null),
        warning: () => vue.h(WarningIcon, null),
        error: () => vue.h(ErrorIcon, null),
        default: () => null
      };
      const NMessage = vue.defineComponent({
        name: "Message",
        props: Object.assign(Object.assign({}, messageProps), {
          render: Function
        }),
        setup(props) {
          const {
            inlineThemeDisabled,
            mergedRtlRef
          } = useConfig(props);
          const {
            props: messageProviderProps2,
            mergedClsPrefixRef
            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
          } = vue.inject(messageProviderInjectionKey);
          const rtlEnabledRef = useRtl("Message", mergedRtlRef, mergedClsPrefixRef);
          const themeRef = useTheme("Message", "-message", style$2, messageLight$1, messageProviderProps2, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              type
            } = props;
            const {
              common: {
                cubicBezierEaseInOut: cubicBezierEaseInOut2
              },
              self: {
                padding,
                margin,
                maxWidth,
                iconMargin,
                closeMargin,
                closeSize,
                iconSize,
                fontSize: fontSize2,
                lineHeight: lineHeight2,
                borderRadius,
                iconColorInfo,
                iconColorSuccess,
                iconColorWarning,
                iconColorError,
                iconColorLoading,
                closeIconSize,
                closeBorderRadius,
                [createKey("textColor", type)]: textColor,
                [createKey("boxShadow", type)]: boxShadow,
                [createKey("color", type)]: color,
                [createKey("closeColorHover", type)]: closeColorHover,
                [createKey("closeColorPressed", type)]: closeColorPressed,
                [createKey("closeIconColor", type)]: closeIconColor,
                [createKey("closeIconColorPressed", type)]: closeIconColorPressed,
                [createKey("closeIconColorHover", type)]: closeIconColorHover
              }
            } = themeRef.value;
            return {
              "--n-bezier": cubicBezierEaseInOut2,
              "--n-margin": margin,
              "--n-padding": padding,
              "--n-max-width": maxWidth,
              "--n-font-size": fontSize2,
              "--n-icon-margin": iconMargin,
              "--n-icon-size": iconSize,
              "--n-close-icon-size": closeIconSize,
              "--n-close-border-radius": closeBorderRadius,
              "--n-close-size": closeSize,
              "--n-close-margin": closeMargin,
              "--n-text-color": textColor,
              "--n-color": color,
              "--n-box-shadow": boxShadow,
              "--n-icon-color-info": iconColorInfo,
              "--n-icon-color-success": iconColorSuccess,
              "--n-icon-color-warning": iconColorWarning,
              "--n-icon-color-error": iconColorError,
              "--n-icon-color-loading": iconColorLoading,
              "--n-close-color-hover": closeColorHover,
              "--n-close-color-pressed": closeColorPressed,
              "--n-close-icon-color": closeIconColor,
              "--n-close-icon-color-pressed": closeIconColorPressed,
              "--n-close-icon-color-hover": closeIconColorHover,
              "--n-line-height": lineHeight2,
              "--n-border-radius": borderRadius
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("message", vue.computed(() => props.type[0]), cssVarsRef, {}) : void 0;
          return {
            mergedClsPrefix: mergedClsPrefixRef,
            rtlEnabled: rtlEnabledRef,
            messageProviderProps: messageProviderProps2,
            handleClose() {
              var _a;
              (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
            },
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,
            placement: messageProviderProps2.placement
          };
        },
        render() {
          const {
            render: renderMessage,
            type,
            closable,
            content,
            mergedClsPrefix,
            cssVars,
            themeClass,
            onRender,
            icon,
            handleClose,
            showIcon
          } = this;
          onRender === null || onRender === void 0 ? void 0 : onRender();
          let iconNode;
          return vue.h("div", {
            class: [`${mergedClsPrefix}-message-wrapper`, themeClass],
            onMouseenter: this.onMouseenter,
            onMouseleave: this.onMouseleave,
            style: [{
              alignItems: this.placement.startsWith("top") ? "flex-start" : "flex-end"
            }, cssVars]
          }, renderMessage ? renderMessage(this.$props) : vue.h("div", {
            class: [`${mergedClsPrefix}-message ${mergedClsPrefix}-message--${type}-type`, this.rtlEnabled && `${mergedClsPrefix}-message--rtl`]
          }, (iconNode = createIconVNode(icon, type, mergedClsPrefix)) && showIcon ? vue.h("div", {
            class: `${mergedClsPrefix}-message__icon ${mergedClsPrefix}-message__icon--${type}-type`
          }, vue.h(NIconSwitchTransition, null, {
            default: () => iconNode
          })) : null, vue.h("div", {
            class: `${mergedClsPrefix}-message__content`
          }, render$1(content)), closable ? vue.h(NBaseClose, {
            clsPrefix: mergedClsPrefix,
            class: `${mergedClsPrefix}-message__close`,
            onClick: handleClose,
            absolute: true
          }) : null));
        }
      });
      function createIconVNode(icon, type, clsPrefix) {
        if (typeof icon === "function") {
          return icon();
        } else {
          const innerIcon = type === "loading" ? vue.h(NBaseLoading, {
            clsPrefix,
            strokeWidth: 24,
            scale: 0.85
          }) : iconRenderMap$1[type]();
          if (!innerIcon)
            return null;
          return vue.h(NBaseIcon, {
            clsPrefix,
            key: type
          }, {
            default: () => innerIcon
          });
        }
      }
      const MessageEnvironment = vue.defineComponent({
        name: "MessageEnvironment",
        props: Object.assign(Object.assign({}, messageProps), {
          duration: {
            type: Number,
            default: 3e3
          },
          onAfterLeave: Function,
          onLeave: Function,
          internalKey: {
            type: String,
            required: true
          },
          // private
          onInternalAfterLeave: Function,
          // deprecated
          onHide: Function,
          onAfterHide: Function
        }),
        setup(props) {
          let timerId = null;
          const showRef = vue.ref(true);
          vue.onMounted(() => {
            setHideTimeout();
          });
          function setHideTimeout() {
            const {
              duration: duration2
            } = props;
            if (duration2) {
              timerId = window.setTimeout(hide, duration2);
            }
          }
          function handleMouseenter(e) {
            if (e.currentTarget !== e.target)
              return;
            if (timerId !== null) {
              window.clearTimeout(timerId);
              timerId = null;
            }
          }
          function handleMouseleave(e) {
            if (e.currentTarget !== e.target)
              return;
            setHideTimeout();
          }
          function hide() {
            const {
              onHide
            } = props;
            showRef.value = false;
            if (timerId) {
              window.clearTimeout(timerId);
              timerId = null;
            }
            if (onHide)
              onHide();
          }
          function handleClose() {
            const {
              onClose
            } = props;
            if (onClose)
              onClose();
            hide();
          }
          function handleAfterLeave() {
            const {
              onAfterLeave,
              onInternalAfterLeave,
              onAfterHide,
              internalKey
            } = props;
            if (onAfterLeave)
              onAfterLeave();
            if (onInternalAfterLeave)
              onInternalAfterLeave(internalKey);
            if (onAfterHide)
              onAfterHide();
          }
          function deactivate() {
            hide();
          }
          return {
            show: showRef,
            hide,
            handleClose,
            handleAfterLeave,
            handleMouseleave,
            handleMouseenter,
            deactivate
          };
        },
        render() {
          return vue.h(NFadeInExpandTransition, {
            appear: true,
            onAfterLeave: this.handleAfterLeave,
            onLeave: this.onLeave
          }, {
            default: () => [this.show ? vue.h(NMessage, {
              content: this.content,
              type: this.type,
              icon: this.icon,
              showIcon: this.showIcon,
              closable: this.closable,
              onClose: this.handleClose,
              onMouseenter: this.keepAliveOnHover ? this.handleMouseenter : void 0,
              onMouseleave: this.keepAliveOnHover ? this.handleMouseleave : void 0
            }) : null]
          });
        }
      });
      const messageProviderProps = Object.assign(Object.assign({}, useTheme.props), {
        to: [String, Object],
        duration: {
          type: Number,
          default: 3e3
        },
        keepAliveOnHover: Boolean,
        max: Number,
        placement: {
          type: String,
          default: "top"
        },
        closable: Boolean,
        containerClass: String,
        containerStyle: [String, Object]
      });
      const NMessageProvider = vue.defineComponent({
        name: "MessageProvider",
        props: messageProviderProps,
        setup(props) {
          const {
            mergedClsPrefixRef
          } = useConfig(props);
          const messageListRef = vue.ref([]);
          const messageRefs = vue.ref({});
          const api2 = {
            create(content, options) {
              return create(content, Object.assign({
                type: "default"
              }, options));
            },
            info(content, options) {
              return create(content, Object.assign(Object.assign({}, options), {
                type: "info"
              }));
            },
            success(content, options) {
              return create(content, Object.assign(Object.assign({}, options), {
                type: "success"
              }));
            },
            warning(content, options) {
              return create(content, Object.assign(Object.assign({}, options), {
                type: "warning"
              }));
            },
            error(content, options) {
              return create(content, Object.assign(Object.assign({}, options), {
                type: "error"
              }));
            },
            loading(content, options) {
              return create(content, Object.assign(Object.assign({}, options), {
                type: "loading"
              }));
            },
            destroyAll
          };
          vue.provide(messageProviderInjectionKey, {
            props,
            mergedClsPrefixRef
          });
          vue.provide(messageApiInjectionKey, api2);
          function create(content, options) {
            const key = createId();
            const messageReactive = vue.reactive(Object.assign(Object.assign({}, options), {
              content,
              key,
              destroy: () => {
                var _a;
                (_a = messageRefs.value[key]) === null || _a === void 0 ? void 0 : _a.hide();
              }
            }));
            const {
              max: max2
            } = props;
            if (max2 && messageListRef.value.length >= max2) {
              messageListRef.value.shift();
            }
            messageListRef.value.push(messageReactive);
            return messageReactive;
          }
          function handleAfterLeave(key) {
            messageListRef.value.splice(messageListRef.value.findIndex((message) => message.key === key), 1);
            delete messageRefs.value[key];
          }
          function destroyAll() {
            Object.values(messageRefs.value).forEach((messageInstRef) => {
              messageInstRef.hide();
            });
          }
          return Object.assign({
            mergedClsPrefix: mergedClsPrefixRef,
            messageRefs,
            messageList: messageListRef,
            handleAfterLeave
          }, api2);
        },
        render() {
          var _a, _b, _c;
          return vue.h(vue.Fragment, null, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a), this.messageList.length ? vue.h(vue.Teleport, {
            to: (_c = this.to) !== null && _c !== void 0 ? _c : "body"
          }, vue.h("div", {
            class: [`${this.mergedClsPrefix}-message-container`, `${this.mergedClsPrefix}-message-container--${this.placement}`, this.containerClass],
            key: "message-container",
            style: this.containerStyle
          }, this.messageList.map((message) => {
            return vue.h(MessageEnvironment, Object.assign({
              ref: (inst) => {
                if (inst) {
                  this.messageRefs[message.key] = inst;
                }
              },
              internalKey: message.key,
              onInternalAfterLeave: this.handleAfterLeave
            }, omit(message, ["destroy"], void 0), {
              duration: message.duration === void 0 ? this.duration : message.duration,
              keepAliveOnHover: message.keepAliveOnHover === void 0 ? this.keepAliveOnHover : message.keepAliveOnHover,
              closable: message.closable === void 0 ? this.closable : message.closable
            }));
          }))) : null);
        }
      });
      function useMessage() {
        const api2 = vue.inject(messageApiInjectionKey, null);
        if (api2 === null) {
          throwError("use-message", "No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A.");
        }
        return api2;
      }
      const notificationProviderInjectionKey = createInjectionKey("n-notification-provider");
      const NotificationContainer = vue.defineComponent({
        name: "NotificationContainer",
        props: {
          scrollable: {
            type: Boolean,
            required: true
          },
          placement: {
            type: String,
            required: true
          }
        },
        setup() {
          const {
            mergedThemeRef,
            mergedClsPrefixRef,
            wipTransitionCountRef
          } = vue.inject(notificationProviderInjectionKey);
          const selfRef = vue.ref(null);
          vue.watchEffect(() => {
            var _a, _b;
            if (wipTransitionCountRef.value > 0) {
              (_a = selfRef === null || selfRef === void 0 ? void 0 : selfRef.value) === null || _a === void 0 ? void 0 : _a.classList.add("transitioning");
            } else {
              (_b = selfRef === null || selfRef === void 0 ? void 0 : selfRef.value) === null || _b === void 0 ? void 0 : _b.classList.remove("transitioning");
            }
          });
          return {
            selfRef,
            mergedTheme: mergedThemeRef,
            mergedClsPrefix: mergedClsPrefixRef,
            transitioning: wipTransitionCountRef
          };
        },
        render() {
          const {
            $slots,
            scrollable,
            mergedClsPrefix,
            mergedTheme,
            placement
          } = this;
          return vue.h("div", {
            ref: "selfRef",
            class: [`${mergedClsPrefix}-notification-container`, scrollable && `${mergedClsPrefix}-notification-container--scrollable`, `${mergedClsPrefix}-notification-container--${placement}`]
          }, scrollable ? vue.h(NScrollbar, {
            theme: mergedTheme.peers.Scrollbar,
            themeOverrides: mergedTheme.peerOverrides.Scrollbar,
            contentStyle: {
              overflow: "hidden"
            }
          }, $slots) : $slots);
        }
      });
      const iconRenderMap = {
        info: () => vue.h(InfoIcon, null),
        success: () => vue.h(SuccessIcon, null),
        warning: () => vue.h(WarningIcon, null),
        error: () => vue.h(ErrorIcon, null),
        default: () => null
      };
      const notificationProps = {
        closable: {
          type: Boolean,
          default: true
        },
        type: {
          type: String,
          default: "default"
        },
        avatar: Function,
        title: [String, Function],
        description: [String, Function],
        content: [String, Function],
        meta: [String, Function],
        action: [String, Function],
        onClose: {
          type: Function,
          required: true
        },
        keepAliveOnHover: Boolean,
        onMouseenter: Function,
        onMouseleave: Function
      };
      const notificationPropKeys = keysOf(notificationProps);
      const Notification = vue.defineComponent({
        name: "Notification",
        props: notificationProps,
        setup(props) {
          const {
            mergedClsPrefixRef,
            mergedThemeRef,
            props: providerProps
            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
          } = vue.inject(notificationProviderInjectionKey);
          const {
            inlineThemeDisabled,
            mergedRtlRef
          } = useConfig();
          const rtlEnabledRef = useRtl("Notification", mergedRtlRef, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              type
            } = props;
            const {
              self: {
                color,
                textColor,
                closeIconColor,
                closeIconColorHover,
                closeIconColorPressed,
                headerTextColor,
                descriptionTextColor,
                actionTextColor,
                borderRadius,
                headerFontWeight,
                boxShadow,
                lineHeight: lineHeight2,
                fontSize: fontSize2,
                closeMargin,
                closeSize,
                width,
                padding,
                closeIconSize,
                closeBorderRadius,
                closeColorHover,
                closeColorPressed,
                titleFontSize,
                metaFontSize,
                descriptionFontSize,
                [createKey("iconColor", type)]: iconColor
              },
              common: {
                cubicBezierEaseOut: cubicBezierEaseOut2,
                cubicBezierEaseIn: cubicBezierEaseIn2,
                cubicBezierEaseInOut: cubicBezierEaseInOut2
              }
            } = mergedThemeRef.value;
            const {
              left,
              right,
              top,
              bottom
            } = getMargin(padding);
            return {
              "--n-color": color,
              "--n-font-size": fontSize2,
              "--n-text-color": textColor,
              "--n-description-text-color": descriptionTextColor,
              "--n-action-text-color": actionTextColor,
              "--n-title-text-color": headerTextColor,
              "--n-title-font-weight": headerFontWeight,
              "--n-bezier": cubicBezierEaseInOut2,
              "--n-bezier-ease-out": cubicBezierEaseOut2,
              "--n-bezier-ease-in": cubicBezierEaseIn2,
              "--n-border-radius": borderRadius,
              "--n-box-shadow": boxShadow,
              "--n-close-border-radius": closeBorderRadius,
              "--n-close-color-hover": closeColorHover,
              "--n-close-color-pressed": closeColorPressed,
              "--n-close-icon-color": closeIconColor,
              "--n-close-icon-color-hover": closeIconColorHover,
              "--n-close-icon-color-pressed": closeIconColorPressed,
              "--n-line-height": lineHeight2,
              "--n-icon-color": iconColor,
              "--n-close-margin": closeMargin,
              "--n-close-size": closeSize,
              "--n-close-icon-size": closeIconSize,
              "--n-width": width,
              "--n-padding-left": left,
              "--n-padding-right": right,
              "--n-padding-top": top,
              "--n-padding-bottom": bottom,
              "--n-title-font-size": titleFontSize,
              "--n-meta-font-size": metaFontSize,
              "--n-description-font-size": descriptionFontSize
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("notification", vue.computed(() => props.type[0]), cssVarsRef, providerProps) : void 0;
          return {
            mergedClsPrefix: mergedClsPrefixRef,
            showAvatar: vue.computed(() => {
              return props.avatar || props.type !== "default";
            }),
            handleCloseClick() {
              props.onClose();
            },
            rtlEnabled: rtlEnabledRef,
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          var _a;
          const {
            mergedClsPrefix
          } = this;
          (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
          return vue.h("div", {
            class: [`${mergedClsPrefix}-notification-wrapper`, this.themeClass],
            onMouseenter: this.onMouseenter,
            onMouseleave: this.onMouseleave,
            style: this.cssVars
          }, vue.h("div", {
            class: [`${mergedClsPrefix}-notification`, this.rtlEnabled && `${mergedClsPrefix}-notification--rtl`, this.themeClass, {
              [`${mergedClsPrefix}-notification--closable`]: this.closable,
              [`${mergedClsPrefix}-notification--show-avatar`]: this.showAvatar
            }],
            style: this.cssVars
          }, this.showAvatar ? vue.h("div", {
            class: `${mergedClsPrefix}-notification__avatar`
          }, this.avatar ? render$1(this.avatar) : this.type !== "default" ? vue.h(NBaseIcon, {
            clsPrefix: mergedClsPrefix
          }, {
            default: () => iconRenderMap[this.type]()
          }) : null) : null, this.closable ? vue.h(NBaseClose, {
            clsPrefix: mergedClsPrefix,
            class: `${mergedClsPrefix}-notification__close`,
            onClick: this.handleCloseClick
          }) : null, vue.h("div", {
            ref: "bodyRef",
            class: `${mergedClsPrefix}-notification-main`
          }, this.title ? vue.h("div", {
            class: `${mergedClsPrefix}-notification-main__header`
          }, render$1(this.title)) : null, this.description ? vue.h("div", {
            class: `${mergedClsPrefix}-notification-main__description`
          }, render$1(this.description)) : null, this.content ? vue.h("pre", {
            class: `${mergedClsPrefix}-notification-main__content`
          }, render$1(this.content)) : null, this.meta || this.action ? vue.h("div", {
            class: `${mergedClsPrefix}-notification-main-footer`
          }, this.meta ? vue.h("div", {
            class: `${mergedClsPrefix}-notification-main-footer__meta`
          }, render$1(this.meta)) : null, this.action ? vue.h("div", {
            class: `${mergedClsPrefix}-notification-main-footer__action`
          }, render$1(this.action)) : null) : null)));
        }
      });
      const notificationEnvOptions = Object.assign(Object.assign({}, notificationProps), {
        duration: Number,
        onClose: Function,
        onLeave: Function,
        onAfterEnter: Function,
        onAfterLeave: Function,
        /** @deprecated */
        onHide: Function,
        /** @deprecated */
        onAfterShow: Function,
        /** @deprecated */
        onAfterHide: Function
      });
      const NotificationEnvironment = vue.defineComponent({
        name: "NotificationEnvironment",
        props: Object.assign(Object.assign({}, notificationEnvOptions), {
          // private
          internalKey: {
            type: String,
            required: true
          },
          onInternalAfterLeave: {
            type: Function,
            required: true
          }
        }),
        setup(props) {
          const {
            wipTransitionCountRef
            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
          } = vue.inject(notificationProviderInjectionKey);
          const showRef = vue.ref(true);
          let timerId = null;
          function hide() {
            showRef.value = false;
            if (timerId) {
              window.clearTimeout(timerId);
            }
          }
          function handleBeforeEnter(el) {
            wipTransitionCountRef.value++;
            void vue.nextTick(() => {
              el.style.height = `${el.offsetHeight}px`;
              el.style.maxHeight = "0";
              el.style.transition = "none";
              void el.offsetHeight;
              el.style.transition = "";
              el.style.maxHeight = el.style.height;
            });
          }
          function handleAfterEnter(el) {
            wipTransitionCountRef.value--;
            el.style.height = "";
            el.style.maxHeight = "";
            const {
              onAfterEnter,
              onAfterShow
            } = props;
            if (onAfterEnter)
              onAfterEnter();
            if (onAfterShow)
              onAfterShow();
          }
          function handleBeforeLeave(el) {
            wipTransitionCountRef.value++;
            el.style.maxHeight = `${el.offsetHeight}px`;
            el.style.height = `${el.offsetHeight}px`;
            void el.offsetHeight;
          }
          function handleLeave(el) {
            const {
              onHide
            } = props;
            if (onHide)
              onHide();
            el.style.maxHeight = "0";
            void el.offsetHeight;
          }
          function handleAfterLeave() {
            wipTransitionCountRef.value--;
            const {
              onAfterLeave,
              onInternalAfterLeave,
              onAfterHide,
              internalKey
            } = props;
            if (onAfterLeave)
              onAfterLeave();
            onInternalAfterLeave(internalKey);
            if (onAfterHide)
              onAfterHide();
          }
          function setHideTimeout() {
            const {
              duration: duration2
            } = props;
            if (duration2) {
              timerId = window.setTimeout(hide, duration2);
            }
          }
          function handleMouseenter(e) {
            if (e.currentTarget !== e.target)
              return;
            if (timerId !== null) {
              window.clearTimeout(timerId);
              timerId = null;
            }
          }
          function handleMouseleave(e) {
            if (e.currentTarget !== e.target)
              return;
            setHideTimeout();
          }
          function handleClose() {
            const {
              onClose
            } = props;
            if (onClose) {
              void Promise.resolve(onClose()).then((feedback) => {
                if (feedback === false)
                  return;
                hide();
              });
            } else {
              hide();
            }
          }
          vue.onMounted(() => {
            if (props.duration) {
              timerId = window.setTimeout(hide, props.duration);
            }
          });
          return {
            show: showRef,
            hide,
            handleClose,
            handleAfterLeave,
            handleLeave,
            handleBeforeLeave,
            handleAfterEnter,
            handleBeforeEnter,
            handleMouseenter,
            handleMouseleave
          };
        },
        render() {
          return vue.h(vue.Transition, {
            name: "notification-transition",
            appear: true,
            // convert to any since Element is not compatible with HTMLElement
            onBeforeEnter: this.handleBeforeEnter,
            onAfterEnter: this.handleAfterEnter,
            onBeforeLeave: this.handleBeforeLeave,
            onLeave: this.handleLeave,
            onAfterLeave: this.handleAfterLeave
          }, {
            default: () => {
              return this.show ? vue.h(Notification, Object.assign({}, keep(this.$props, notificationPropKeys), {
                onClose: this.handleClose,
                onMouseenter: this.duration && this.keepAliveOnHover ? this.handleMouseenter : void 0,
                onMouseleave: this.duration && this.keepAliveOnHover ? this.handleMouseleave : void 0
              })) : null;
            }
          });
        }
      });
      const style$1 = c([cB("notification-container", `
 z-index: 4000;
 position: fixed;
 overflow: visible;
 display: flex;
 flex-direction: column;
 align-items: flex-end;
 `, [c(">", [cB("scrollbar", `
 width: initial;
 overflow: visible;
 height: -moz-fit-content !important;
 height: fit-content !important;
 max-height: 100vh !important;
 `, [c(">", [cB("scrollbar-container", `
 height: -moz-fit-content !important;
 height: fit-content !important;
 max-height: 100vh !important;
 `, [cB("scrollbar-content", `
 padding-top: 12px;
 padding-bottom: 33px;
 `)])])])]), cM("top, top-right, top-left", `
 top: 12px;
 `, [c("&.transitioning >", [cB("scrollbar", [c(">", [cB("scrollbar-container", `
 min-height: 100vh !important;
 `)])])])]), cM("bottom, bottom-right, bottom-left", `
 bottom: 12px;
 `, [c(">", [cB("scrollbar", [c(">", [cB("scrollbar-container", [cB("scrollbar-content", `
 padding-bottom: 12px;
 `)])])])]), cB("notification-wrapper", `
 display: flex;
 align-items: flex-end;
 margin-bottom: 0;
 margin-top: 12px;
 `)]), cM("top, bottom", `
 left: 50%;
 transform: translateX(-50%);
 `, [cB("notification-wrapper", [c("&.notification-transition-enter-from, &.notification-transition-leave-to", `
 transform: scale(0.85);
 `), c("&.notification-transition-leave-from, &.notification-transition-enter-to", `
 transform: scale(1);
 `)])]), cM("top", [cB("notification-wrapper", `
 transform-origin: top center;
 `)]), cM("bottom", [cB("notification-wrapper", `
 transform-origin: bottom center;
 `)]), cM("top-right, bottom-right", [cB("notification", `
 margin-left: 28px;
 margin-right: 16px;
 `)]), cM("top-left, bottom-left", [cB("notification", `
 margin-left: 16px;
 margin-right: 28px;
 `)]), cM("top-right", `
 right: 0;
 `, [placementTransformStyle("top-right")]), cM("top-left", `
 left: 0;
 `, [placementTransformStyle("top-left")]), cM("bottom-right", `
 right: 0;
 `, [placementTransformStyle("bottom-right")]), cM("bottom-left", `
 left: 0;
 `, [placementTransformStyle("bottom-left")]), cM("scrollable", [cM("top-right", `
 top: 0;
 `), cM("top-left", `
 top: 0;
 `), cM("bottom-right", `
 bottom: 0;
 `), cM("bottom-left", `
 bottom: 0;
 `)]), cB("notification-wrapper", `
 margin-bottom: 12px;
 `, [c("&.notification-transition-enter-from, &.notification-transition-leave-to", `
 opacity: 0;
 margin-top: 0 !important;
 margin-bottom: 0 !important;
 `), c("&.notification-transition-leave-from, &.notification-transition-enter-to", `
 opacity: 1;
 `), c("&.notification-transition-leave-active", `
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 transform .3s var(--n-bezier-ease-in),
 max-height .3s var(--n-bezier),
 margin-top .3s linear,
 margin-bottom .3s linear,
 box-shadow .3s var(--n-bezier);
 `), c("&.notification-transition-enter-active", `
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 transform .3s var(--n-bezier-ease-out),
 max-height .3s var(--n-bezier),
 margin-top .3s linear,
 margin-bottom .3s linear,
 box-shadow .3s var(--n-bezier);
 `)]), cB("notification", `
 background-color: var(--n-color);
 color: var(--n-text-color);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
 font-family: inherit;
 font-size: var(--n-font-size);
 font-weight: 400;
 position: relative;
 display: flex;
 overflow: hidden;
 flex-shrink: 0;
 padding-left: var(--n-padding-left);
 padding-right: var(--n-padding-right);
 width: var(--n-width);
 max-width: calc(100vw - 16px - 16px);
 border-radius: var(--n-border-radius);
 box-shadow: var(--n-box-shadow);
 box-sizing: border-box;
 opacity: 1;
 `, [cE("avatar", [cB("icon", `
 color: var(--n-icon-color);
 `), cB("base-icon", `
 color: var(--n-icon-color);
 `)]), cM("show-avatar", [cB("notification-main", `
 margin-left: 40px;
 width: calc(100% - 40px); 
 `)]), cM("closable", [cB("notification-main", [c("> *:first-child", `
 padding-right: 20px;
 `)]), cE("close", `
 position: absolute;
 top: 0;
 right: 0;
 margin: var(--n-close-margin);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `)]), cE("avatar", `
 position: absolute;
 top: var(--n-padding-top);
 left: var(--n-padding-left);
 width: 28px;
 height: 28px;
 font-size: 28px;
 display: flex;
 align-items: center;
 justify-content: center;
 `, [cB("icon", "transition: color .3s var(--n-bezier);")]), cB("notification-main", `
 padding-top: var(--n-padding-top);
 padding-bottom: var(--n-padding-bottom);
 box-sizing: border-box;
 display: flex;
 flex-direction: column;
 margin-left: 8px;
 width: calc(100% - 8px);
 `, [cB("notification-main-footer", `
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-top: 12px;
 `, [cE("meta", `
 font-size: var(--n-meta-font-size);
 transition: color .3s var(--n-bezier-ease-out);
 color: var(--n-description-text-color);
 `), cE("action", `
 cursor: pointer;
 transition: color .3s var(--n-bezier-ease-out);
 color: var(--n-action-text-color);
 `)]), cE("header", `
 font-weight: var(--n-title-font-weight);
 font-size: var(--n-title-font-size);
 transition: color .3s var(--n-bezier-ease-out);
 color: var(--n-title-text-color);
 `), cE("description", `
 margin-top: 8px;
 font-size: var(--n-description-font-size);
 white-space: pre-wrap;
 word-wrap: break-word;
 transition: color .3s var(--n-bezier-ease-out);
 color: var(--n-description-text-color);
 `), cE("content", `
 line-height: var(--n-line-height);
 margin: 12px 0 0 0;
 font-family: inherit;
 white-space: pre-wrap;
 word-wrap: break-word;
 transition: color .3s var(--n-bezier-ease-out);
 color: var(--n-text-color);
 `, [c("&:first-child", "margin: 0;")])])])])]);
      function placementTransformStyle(placement) {
        const direction = placement.split("-")[1];
        const transformXEnter = direction === "left" ? "calc(-100%)" : "calc(100%)";
        const transformXLeave = "0";
        return cB("notification-wrapper", [c("&.notification-transition-enter-from, &.notification-transition-leave-to", `
 transform: translate(${transformXEnter}, 0);
 `), c("&.notification-transition-leave-from, &.notification-transition-enter-to", `
 transform: translate(${transformXLeave}, 0);
 `)]);
      }
      const notificationApiInjectionKey = createInjectionKey("n-notification-api");
      const notificationProviderProps = Object.assign(Object.assign({}, useTheme.props), {
        containerClass: String,
        containerStyle: [String, Object],
        to: [String, Object],
        scrollable: {
          type: Boolean,
          default: true
        },
        max: Number,
        placement: {
          type: String,
          default: "top-right"
        },
        keepAliveOnHover: Boolean
      });
      const NNotificationProvider = vue.defineComponent({
        name: "NotificationProvider",
        props: notificationProviderProps,
        setup(props) {
          const {
            mergedClsPrefixRef
          } = useConfig(props);
          const notificationListRef = vue.ref([]);
          const notificationRefs = {};
          const leavingKeySet = /* @__PURE__ */ new Set();
          function create(options) {
            const key = createId();
            const destroy = () => {
              leavingKeySet.add(key);
              if (notificationRefs[key]) {
                notificationRefs[key].hide();
              }
            };
            const notificationReactive = vue.reactive(Object.assign(Object.assign({}, options), {
              key,
              destroy,
              hide: destroy,
              deactivate: destroy
            }));
            const {
              max: max2
            } = props;
            if (max2 && notificationListRef.value.length - leavingKeySet.size >= max2) {
              let someoneMountedRemoved = false;
              let index = 0;
              for (const notification of notificationListRef.value) {
                if (!leavingKeySet.has(notification.key)) {
                  if (notificationRefs[notification.key]) {
                    notification.destroy();
                    someoneMountedRemoved = true;
                  }
                  break;
                }
                index++;
              }
              if (!someoneMountedRemoved) {
                notificationListRef.value.splice(index, 1);
              }
            }
            notificationListRef.value.push(notificationReactive);
            return notificationReactive;
          }
          const apis = ["info", "success", "warning", "error"].map((type) => {
            return (options) => create(Object.assign(Object.assign({}, options), {
              type
            }));
          });
          function handleAfterLeave(key) {
            leavingKeySet.delete(key);
            notificationListRef.value.splice(notificationListRef.value.findIndex((notification) => notification.key === key), 1);
          }
          const themeRef = useTheme("Notification", "-notification", style$1, notificationLight$1, props, mergedClsPrefixRef);
          const api2 = {
            create,
            info: apis[0],
            success: apis[1],
            warning: apis[2],
            error: apis[3],
            open,
            destroyAll
          };
          const wipTransitionCountRef = vue.ref(0);
          vue.provide(notificationApiInjectionKey, api2);
          vue.provide(notificationProviderInjectionKey, {
            props,
            mergedClsPrefixRef,
            mergedThemeRef: themeRef,
            wipTransitionCountRef
          });
          function open(options) {
            return create(options);
          }
          function destroyAll() {
            Object.values(notificationListRef.value).forEach((notification) => {
              notification.hide();
            });
          }
          return Object.assign({
            mergedClsPrefix: mergedClsPrefixRef,
            notificationList: notificationListRef,
            notificationRefs,
            handleAfterLeave
          }, api2);
        },
        render() {
          var _a, _b, _c;
          const {
            placement
          } = this;
          return vue.h(vue.Fragment, null, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a), this.notificationList.length ? vue.h(vue.Teleport, {
            to: (_c = this.to) !== null && _c !== void 0 ? _c : "body"
          }, vue.h(NotificationContainer, {
            class: this.containerClass,
            style: this.containerStyle,
            scrollable: this.scrollable && placement !== "top" && placement !== "bottom",
            placement
          }, {
            default: () => {
              return this.notificationList.map((notification) => {
                return vue.h(NotificationEnvironment, Object.assign({
                  ref: (inst) => {
                    const refKey = notification.key;
                    if (inst === null) {
                      delete this.notificationRefs[refKey];
                    } else
                      this.notificationRefs[refKey] = inst;
                  }
                }, omit(notification, ["destroy", "hide", "deactivate"]), {
                  internalKey: notification.key,
                  onInternalAfterLeave: this.handleAfterLeave,
                  keepAliveOnHover: notification.keepAliveOnHover === void 0 ? this.keepAliveOnHover : notification.keepAliveOnHover
                }));
              });
            }
          })) : null);
        }
      });
      function useNotification() {
        const api2 = vue.inject(notificationApiInjectionKey, null);
        if (api2 === null) {
          throwError("use-notification", "No outer `n-notification-provider` found.");
        }
        return api2;
      }
      const style = c([c("@keyframes spin-rotate", `
 from {
 transform: rotate(0);
 }
 to {
 transform: rotate(360deg);
 }
 `), cB("spin-container", `
 position: relative;
 `, [cB("spin-body", `
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translateX(-50%) translateY(-50%);
 `, [fadeInTransition()])]), cB("spin-body", `
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex-direction: column;
 `), cB("spin", `
 display: inline-flex;
 height: var(--n-size);
 width: var(--n-size);
 font-size: var(--n-size);
 color: var(--n-color);
 `, [cM("rotate", `
 animation: spin-rotate 2s linear infinite;
 `)]), cB("spin-description", `
 display: inline-block;
 font-size: var(--n-font-size);
 color: var(--n-text-color);
 transition: color .3s var(--n-bezier);
 margin-top: 8px;
 `), cB("spin-content", `
 opacity: 1;
 transition: opacity .3s var(--n-bezier);
 pointer-events: all;
 `, [cM("spinning", `
 user-select: none;
 -webkit-user-select: none;
 pointer-events: none;
 opacity: var(--n-opacity-spinning);
 `)])]);
      const STROKE_WIDTH = {
        small: 20,
        medium: 18,
        large: 16
      };
      const spinProps = Object.assign(Object.assign({}, useTheme.props), {
        contentClass: String,
        contentStyle: [Object, String],
        description: String,
        stroke: String,
        size: {
          type: [String, Number],
          default: "medium"
        },
        show: {
          type: Boolean,
          default: true
        },
        strokeWidth: Number,
        rotate: {
          type: Boolean,
          default: true
        },
        spinning: {
          type: Boolean,
          validator: () => {
            return true;
          },
          default: void 0
        },
        delay: Number
      });
      const NSpin = vue.defineComponent({
        name: "Spin",
        props: spinProps,
        setup(props) {
          const {
            mergedClsPrefixRef,
            inlineThemeDisabled
          } = useConfig(props);
          const themeRef = useTheme("Spin", "-spin", style, spinLight$1, props, mergedClsPrefixRef);
          const cssVarsRef = vue.computed(() => {
            const {
              size: spinSize
            } = props;
            const {
              common: {
                cubicBezierEaseInOut: cubicBezierEaseInOut2
              },
              self: self2
            } = themeRef.value;
            const {
              opacitySpinning,
              color,
              textColor
            } = self2;
            const size2 = typeof spinSize === "number" ? pxfy(spinSize) : self2[createKey("size", spinSize)];
            return {
              "--n-bezier": cubicBezierEaseInOut2,
              "--n-opacity-spinning": opacitySpinning,
              "--n-size": size2,
              "--n-color": color,
              "--n-text-color": textColor
            };
          });
          const themeClassHandle = inlineThemeDisabled ? useThemeClass("spin", vue.computed(() => {
            const {
              size: size2
            } = props;
            return typeof size2 === "number" ? String(size2) : size2[0];
          }), cssVarsRef, props) : void 0;
          const compitableShow = useCompitable(props, ["spinning", "show"]);
          const activeRef = vue.ref(false);
          vue.watchEffect((onCleanup) => {
            let timerId;
            if (compitableShow.value) {
              const {
                delay
              } = props;
              if (delay) {
                timerId = window.setTimeout(() => {
                  activeRef.value = true;
                }, delay);
                onCleanup(() => {
                  clearTimeout(timerId);
                });
                return;
              }
            }
            activeRef.value = compitableShow.value;
          });
          return {
            mergedClsPrefix: mergedClsPrefixRef,
            active: activeRef,
            mergedStrokeWidth: vue.computed(() => {
              const {
                strokeWidth
              } = props;
              if (strokeWidth !== void 0)
                return strokeWidth;
              const {
                size: size2
              } = props;
              return STROKE_WIDTH[typeof size2 === "number" ? "medium" : size2];
            }),
            cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
            themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
            onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
          };
        },
        render() {
          var _a, _b;
          const {
            $slots,
            mergedClsPrefix,
            description
          } = this;
          const rotate = $slots.icon && this.rotate;
          const descriptionNode = (description || $slots.description) && vue.h("div", {
            class: `${mergedClsPrefix}-spin-description`
          }, description || ((_a = $slots.description) === null || _a === void 0 ? void 0 : _a.call($slots)));
          const icon = $slots.icon ? vue.h("div", {
            class: [`${mergedClsPrefix}-spin-body`, this.themeClass]
          }, vue.h("div", {
            class: [`${mergedClsPrefix}-spin`, rotate && `${mergedClsPrefix}-spin--rotate`],
            style: $slots.default ? "" : this.cssVars
          }, $slots.icon()), descriptionNode) : vue.h("div", {
            class: [`${mergedClsPrefix}-spin-body`, this.themeClass]
          }, vue.h(NBaseLoading, {
            clsPrefix: mergedClsPrefix,
            style: $slots.default ? "" : this.cssVars,
            stroke: this.stroke,
            "stroke-width": this.mergedStrokeWidth,
            class: `${mergedClsPrefix}-spin`
          }), descriptionNode);
          (_b = this.onRender) === null || _b === void 0 ? void 0 : _b.call(this);
          return $slots.default ? vue.h("div", {
            class: [`${mergedClsPrefix}-spin-container`, this.themeClass],
            style: this.cssVars
          }, vue.h("div", {
            class: [`${mergedClsPrefix}-spin-content`, this.active && `${mergedClsPrefix}-spin-content--spinning`, this.contentClass],
            style: this.contentStyle
          }, $slots), vue.h(vue.Transition, {
            name: "fade-in-transition"
          }, {
            default: () => this.active ? icon : null
          })) : icon;
        }
      });
      const NInjectionExtractor = vue.defineComponent({
        name: "InjectionExtractor",
        props: {
          onSetup: Function
        },
        setup(props, {
          slots
        }) {
          var _a;
          (_a = props.onSetup) === null || _a === void 0 ? void 0 : _a.call(props);
          return () => {
            var _a2;
            return (_a2 = slots.default) === null || _a2 === void 0 ? void 0 : _a2.call(slots);
          };
        }
      });
      const injectionFactoryMap = {
        message: useMessage,
        notification: useNotification,
        loadingBar: useLoadingBar,
        dialog: useDialog
      };
      function createDiscreteApp({
        providersAndProps,
        configProviderProps: configProviderProps2
      }) {
        const App = () => {
          return vue.h(NConfigProvider, vue.unref(configProviderProps2), {
            default: () => providersAndProps.map(({
              type,
              Provider,
              props
            }) => {
              return vue.h(Provider, vue.unref(props), {
                default: () => vue.h(NInjectionExtractor, {
                  onSetup: () => extractedApi[type] = injectionFactoryMap[type]()
                })
              });
            })
          });
        };
        let app = vue.createApp(App);
        const extractedApi = {
          app
        };
        let hostEl;
        if (isBrowser$2) {
          hostEl = document.createElement("div");
          document.body.appendChild(hostEl);
          app.mount(hostEl);
        }
        const unmount2 = () => {
          var _a;
          if (app === null || hostEl === null) {
            warn$2("discrete", "unmount call no need because discrete app has been unmounted");
            return;
          }
          app.unmount();
          (_a = hostEl.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(hostEl);
          hostEl = null;
          app = null;
        };
        return Object.assign({
          unmount: unmount2
        }, extractedApi);
      }
      function createDiscreteApi(includes, {
        configProviderProps: configProviderProps2,
        messageProviderProps: messageProviderProps2,
        dialogProviderProps: dialogProviderProps2,
        notificationProviderProps: notificationProviderProps2,
        loadingBarProviderProps: loadingBarProviderProps2
      } = {}) {
        const providersAndProps = [];
        includes.forEach((type) => {
          switch (type) {
            case "message":
              providersAndProps.push({
                type,
                Provider: NMessageProvider,
                props: messageProviderProps2
              });
              break;
            case "notification":
              providersAndProps.push({
                type,
                Provider: NNotificationProvider,
                props: notificationProviderProps2
              });
              break;
            case "dialog":
              providersAndProps.push({
                type,
                Provider: NDialogProvider,
                props: dialogProviderProps2
              });
              break;
            case "loadingBar":
              providersAndProps.push({
                type,
                Provider: NLoadingBarProvider,
                props: loadingBarProviderProps2
              });
              break;
          }
        });
        const discreteApp = createDiscreteApp({
          providersAndProps,
          configProviderProps: configProviderProps2
        });
        return discreteApp;
      }
      var jquery = { exports: {} };
      /*!
       * jQuery JavaScript Library v3.7.1
       * https://jquery.com/
       *
       * Copyright OpenJS Foundation and other contributors
       * Released under the MIT license
       * https://jquery.org/license
       *
       * Date: 2023-08-28T13:37Z
       */
      (function(module2) {
        (function(global2, factory) {
          {
            module2.exports = global2.document ? factory(global2, true) : function(w) {
              if (!w.document) {
                throw new Error("jQuery requires a window with a document");
              }
              return factory(w);
            };
          }
        })(typeof window !== "undefined" ? window : commonjsGlobal, function(window2, noGlobal) {
          var arr = [];
          var getProto2 = Object.getPrototypeOf;
          var slice = arr.slice;
          var flat = arr.flat ? function(array) {
            return arr.flat.call(array);
          } : function(array) {
            return arr.concat.apply([], array);
          };
          var push2 = arr.push;
          var indexOf2 = arr.indexOf;
          var class2type = {};
          var toString2 = class2type.toString;
          var hasOwn2 = class2type.hasOwnProperty;
          var fnToString = hasOwn2.toString;
          var ObjectFunctionString = fnToString.call(Object);
          var support = {};
          var isFunction2 = function isFunction3(obj) {
            return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
          };
          var isWindow = function isWindow2(obj) {
            return obj != null && obj === obj.window;
          };
          var document2 = window2.document;
          var preservedScriptAttributes = {
            type: true,
            src: true,
            nonce: true,
            noModule: true
          };
          function DOMEval(code, node, doc) {
            doc = doc || document2;
            var i, val, script = doc.createElement("script");
            script.text = code;
            if (node) {
              for (i in preservedScriptAttributes) {
                val = node[i] || node.getAttribute && node.getAttribute(i);
                if (val) {
                  script.setAttribute(i, val);
                }
              }
            }
            doc.head.appendChild(script).parentNode.removeChild(script);
          }
          function toType(obj) {
            if (obj == null) {
              return obj + "";
            }
            return typeof obj === "object" || typeof obj === "function" ? class2type[toString2.call(obj)] || "object" : typeof obj;
          }
          var version = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) {
            return new jQuery.fn.init(selector, context);
          };
          jQuery.fn = jQuery.prototype = {
            // The current version of jQuery being used
            jquery: version,
            constructor: jQuery,
            // The default length of a jQuery object is 0
            length: 0,
            toArray: function() {
              return slice.call(this);
            },
            // Get the Nth element in the matched element set OR
            // Get the whole matched element set as a clean array
            get: function(num) {
              if (num == null) {
                return slice.call(this);
              }
              return num < 0 ? this[num + this.length] : this[num];
            },
            // Take an array of elements and push it onto the stack
            // (returning the new matched element set)
            pushStack: function(elems) {
              var ret = jQuery.merge(this.constructor(), elems);
              ret.prevObject = this;
              return ret;
            },
            // Execute a callback for every element in the matched set.
            each: function(callback) {
              return jQuery.each(this, callback);
            },
            map: function(callback) {
              return this.pushStack(jQuery.map(this, function(elem, i) {
                return callback.call(elem, i, elem);
              }));
            },
            slice: function() {
              return this.pushStack(slice.apply(this, arguments));
            },
            first: function() {
              return this.eq(0);
            },
            last: function() {
              return this.eq(-1);
            },
            even: function() {
              return this.pushStack(jQuery.grep(this, function(_elem, i) {
                return (i + 1) % 2;
              }));
            },
            odd: function() {
              return this.pushStack(jQuery.grep(this, function(_elem, i) {
                return i % 2;
              }));
            },
            eq: function(i) {
              var len = this.length, j = +i + (i < 0 ? len : 0);
              return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
            },
            end: function() {
              return this.prevObject || this.constructor();
            },
            // For internal use only.
            // Behaves like an Array's method, not like a jQuery method.
            push: push2,
            sort: arr.sort,
            splice: arr.splice
          };
          jQuery.extend = jQuery.fn.extend = function() {
            var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
            if (typeof target === "boolean") {
              deep = target;
              target = arguments[i] || {};
              i++;
            }
            if (typeof target !== "object" && !isFunction2(target)) {
              target = {};
            }
            if (i === length) {
              target = this;
              i--;
            }
            for (; i < length; i++) {
              if ((options = arguments[i]) != null) {
                for (name in options) {
                  copy = options[name];
                  if (name === "__proto__" || target === copy) {
                    continue;
                  }
                  if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
                    src = target[name];
                    if (copyIsArray && !Array.isArray(src)) {
                      clone = [];
                    } else if (!copyIsArray && !jQuery.isPlainObject(src)) {
                      clone = {};
                    } else {
                      clone = src;
                    }
                    copyIsArray = false;
                    target[name] = jQuery.extend(deep, clone, copy);
                  } else if (copy !== void 0) {
                    target[name] = copy;
                  }
                }
              }
            }
            return target;
          };
          jQuery.extend({
            // Unique for each copy of jQuery on the page
            expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
            // Assume jQuery is ready without the ready module
            isReady: true,
            error: function(msg2) {
              throw new Error(msg2);
            },
            noop: function() {
            },
            isPlainObject: function(obj) {
              var proto, Ctor;
              if (!obj || toString2.call(obj) !== "[object Object]") {
                return false;
              }
              proto = getProto2(obj);
              if (!proto) {
                return true;
              }
              Ctor = hasOwn2.call(proto, "constructor") && proto.constructor;
              return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
            },
            isEmptyObject: function(obj) {
              var name;
              for (name in obj) {
                return false;
              }
              return true;
            },
            // Evaluates a script in a provided context; falls back to the global one
            // if not specified.
            globalEval: function(code, options, doc) {
              DOMEval(code, { nonce: options && options.nonce }, doc);
            },
            each: function(obj, callback) {
              var length, i = 0;
              if (isArrayLike2(obj)) {
                length = obj.length;
                for (; i < length; i++) {
                  if (callback.call(obj[i], i, obj[i]) === false) {
                    break;
                  }
                }
              } else {
                for (i in obj) {
                  if (callback.call(obj[i], i, obj[i]) === false) {
                    break;
                  }
                }
              }
              return obj;
            },
            // Retrieve the text value of an array of DOM nodes
            text: function(elem) {
              var node, ret = "", i = 0, nodeType = elem.nodeType;
              if (!nodeType) {
                while (node = elem[i++]) {
                  ret += jQuery.text(node);
                }
              }
              if (nodeType === 1 || nodeType === 11) {
                return elem.textContent;
              }
              if (nodeType === 9) {
                return elem.documentElement.textContent;
              }
              if (nodeType === 3 || nodeType === 4) {
                return elem.nodeValue;
              }
              return ret;
            },
            // results is for internal usage only
            makeArray: function(arr2, results) {
              var ret = results || [];
              if (arr2 != null) {
                if (isArrayLike2(Object(arr2))) {
                  jQuery.merge(
                    ret,
                    typeof arr2 === "string" ? [arr2] : arr2
                  );
                } else {
                  push2.call(ret, arr2);
                }
              }
              return ret;
            },
            inArray: function(elem, arr2, i) {
              return arr2 == null ? -1 : indexOf2.call(arr2, elem, i);
            },
            isXMLDoc: function(elem) {
              var namespace2 = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement;
              return !rhtmlSuffix.test(namespace2 || docElem && docElem.nodeName || "HTML");
            },
            // Support: Android <=4.0 only, PhantomJS 1 only
            // push.apply(_, arraylike) throws on ancient WebKit
            merge: function(first, second) {
              var len = +second.length, j = 0, i = first.length;
              for (; j < len; j++) {
                first[i++] = second[j];
              }
              first.length = i;
              return first;
            },
            grep: function(elems, callback, invert) {
              var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert;
              for (; i < length; i++) {
                callbackInverse = !callback(elems[i], i);
                if (callbackInverse !== callbackExpect) {
                  matches.push(elems[i]);
                }
              }
              return matches;
            },
            // arg is for internal usage only
            map: function(elems, callback, arg) {
              var length, value, i = 0, ret = [];
              if (isArrayLike2(elems)) {
                length = elems.length;
                for (; i < length; i++) {
                  value = callback(elems[i], i, arg);
                  if (value != null) {
                    ret.push(value);
                  }
                }
              } else {
                for (i in elems) {
                  value = callback(elems[i], i, arg);
                  if (value != null) {
                    ret.push(value);
                  }
                }
              }
              return flat(ret);
            },
            // A global GUID counter for objects
            guid: 1,
            // jQuery.support is not used in Core but other projects attach their
            // properties to it so it needs to exist.
            support
          });
          if (typeof Symbol === "function") {
            jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
          }
          jQuery.each(
            "Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
            function(_i, name) {
              class2type["[object " + name + "]"] = name.toLowerCase();
            }
          );
          function isArrayLike2(obj) {
            var length = !!obj && "length" in obj && obj.length, type = toType(obj);
            if (isFunction2(obj) || isWindow(obj)) {
              return false;
            }
            return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
          }
          function nodeName(elem, name) {
            return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
          }
          var pop = arr.pop;
          var sort = arr.sort;
          var splice2 = arr.splice;
          var whitespace = "[\\x20\\t\\r\\n\\f]";
          var rtrimCSS = new RegExp(
            "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
            "g"
          );
          jQuery.contains = function(a, b) {
            var bup = b && b.parentNode;
            return a === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+
            // IE doesn't have `contains` on SVG.
            (a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
          };
          var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
          function fcssescape(ch, asCodePoint) {
            if (asCodePoint) {
              if (ch === "\0") {
                return "�";
              }
              return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
            }
            return "\\" + ch;
          }
          jQuery.escapeSelector = function(sel) {
            return (sel + "").replace(rcssescape, fcssescape);
          };
          var preferredDoc = document2, pushNative = push2;
          (function() {
            var i, Expr, outermostContext, sortInput, hasDuplicate, push3 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) {
              if (a === b) {
                hasDuplicate = true;
              }
              return 0;
            }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)
            "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
            `*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(` + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
              ID: new RegExp("^#(" + identifier + ")"),
              CLASS: new RegExp("^\\.(" + identifier + ")"),
              TAG: new RegExp("^(" + identifier + "|[*])"),
              ATTR: new RegExp("^" + attributes),
              PSEUDO: new RegExp("^" + pseudos),
              CHILD: new RegExp(
                "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)",
                "i"
              ),
              bool: new RegExp("^(?:" + booleans + ")$", "i"),
              // For use in libraries implementing .is()
              // We use this for POS matching in `select`
              needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
            }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape2, nonHex) {
              var high = "0x" + escape2.slice(1) - 65536;
              if (nonHex) {
                return nonHex;
              }
              return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
            }, unloadHandler = function() {
              setDocument();
            }, inDisabledFieldset = addCombinator(
              function(elem) {
                return elem.disabled === true && nodeName(elem, "fieldset");
              },
              { dir: "parentNode", next: "legend" }
            );
            function safeActiveElement() {
              try {
                return document3.activeElement;
              } catch (err) {
              }
            }
            try {
              push3.apply(
                arr = slice.call(preferredDoc.childNodes),
                preferredDoc.childNodes
              );
              arr[preferredDoc.childNodes.length].nodeType;
            } catch (e) {
              push3 = {
                apply: function(target, els) {
                  pushNative.apply(target, slice.call(els));
                },
                call: function(target) {
                  pushNative.apply(target, slice.call(arguments, 1));
                }
              };
            }
            function find2(selector, context, results, seed) {
              var m, i2, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9;
              results = results || [];
              if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
                return results;
              }
              if (!seed) {
                setDocument(context);
                context = context || document3;
                if (documentIsHTML) {
                  if (nodeType !== 11 && (match = rquickExpr2.exec(selector))) {
                    if (m = match[1]) {
                      if (nodeType === 9) {
                        if (elem = context.getElementById(m)) {
                          if (elem.id === m) {
                            push3.call(results, elem);
                            return results;
                          }
                        } else {
                          return results;
                        }
                      } else {
                        if (newContext && (elem = newContext.getElementById(m)) && find2.contains(context, elem) && elem.id === m) {
                          push3.call(results, elem);
                          return results;
                        }
                      }
                    } else if (match[2]) {
                      push3.apply(results, context.getElementsByTagName(selector));
                      return results;
                    } else if ((m = match[3]) && context.getElementsByClassName) {
                      push3.apply(results, context.getElementsByClassName(m));
                      return results;
                    }
                  }
                  if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
                    newSelector = selector;
                    newContext = context;
                    if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {
                      newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
                      if (newContext != context || !support.scope) {
                        if (nid = context.getAttribute("id")) {
                          nid = jQuery.escapeSelector(nid);
                        } else {
                          context.setAttribute("id", nid = expando);
                        }
                      }
                      groups = tokenize(selector);
                      i2 = groups.length;
                      while (i2--) {
                        groups[i2] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i2]);
                      }
                      newSelector = groups.join(",");
                    }
                    try {
                      push3.apply(
                        results,
                        newContext.querySelectorAll(newSelector)
                      );
                      return results;
                    } catch (qsaError) {
                      nonnativeSelectorCache(selector, true);
                    } finally {
                      if (nid === expando) {
                        context.removeAttribute("id");
                      }
                    }
                  }
                }
              }
              return select(selector.replace(rtrimCSS, "$1"), context, results, seed);
            }
            function createCache() {
              var keys = [];
              function cache2(key, value) {
                if (keys.push(key + " ") > Expr.cacheLength) {
                  delete cache2[keys.shift()];
                }
                return cache2[key + " "] = value;
              }
              return cache2;
            }
            function markFunction(fn) {
              fn[expando] = true;
              return fn;
            }
            function assert(fn) {
              var el = document3.createElement("fieldset");
              try {
                return !!fn(el);
              } catch (e) {
                return false;
              } finally {
                if (el.parentNode) {
                  el.parentNode.removeChild(el);
                }
                el = null;
              }
            }
            function createInputPseudo(type) {
              return function(elem) {
                return nodeName(elem, "input") && elem.type === type;
              };
            }
            function createButtonPseudo(type) {
              return function(elem) {
                return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type;
              };
            }
            function createDisabledPseudo(disabled) {
              return function(elem) {
                if ("form" in elem) {
                  if (elem.parentNode && elem.disabled === false) {
                    if ("label" in elem) {
                      if ("label" in elem.parentNode) {
                        return elem.parentNode.disabled === disabled;
                      } else {
                        return elem.disabled === disabled;
                      }
                    }
                    return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
                    elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
                  }
                  return elem.disabled === disabled;
                } else if ("label" in elem) {
                  return elem.disabled === disabled;
                }
                return false;
              };
            }
            function createPositionalPseudo(fn) {
              return markFunction(function(argument) {
                argument = +argument;
                return markFunction(function(seed, matches2) {
                  var j, matchIndexes = fn([], seed.length, argument), i2 = matchIndexes.length;
                  while (i2--) {
                    if (seed[j = matchIndexes[i2]]) {
                      seed[j] = !(matches2[j] = seed[j]);
                    }
                  }
                });
              });
            }
            function testContext(context) {
              return context && typeof context.getElementsByTagName !== "undefined" && context;
            }
            function setDocument(node) {
              var subWindow, doc = node ? node.ownerDocument || node : preferredDoc;
              if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) {
                return document3;
              }
              document3 = doc;
              documentElement2 = document3.documentElement;
              documentIsHTML = !jQuery.isXMLDoc(document3);
              matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector;
              if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
              // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
              // two documents; shallow comparisons work.
              // eslint-disable-next-line eqeqeq
              preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) {
                subWindow.addEventListener("unload", unloadHandler);
              }
              support.getById = assert(function(el) {
                documentElement2.appendChild(el).id = jQuery.expando;
                return !document3.getElementsByName || !document3.getElementsByName(jQuery.expando).length;
              });
              support.disconnectedMatch = assert(function(el) {
                return matches.call(el, "*");
              });
              support.scope = assert(function() {
                return document3.querySelectorAll(":scope");
              });
              support.cssHas = assert(function() {
                try {
                  document3.querySelector(":has(*,:jqfake)");
                  return false;
                } catch (e) {
                  return true;
                }
              });
              if (support.getById) {
                Expr.filter.ID = function(id) {
                  var attrId = id.replace(runescape, funescape);
                  return function(elem) {
                    return elem.getAttribute("id") === attrId;
                  };
                };
                Expr.find.ID = function(id, context) {
                  if (typeof context.getElementById !== "undefined" && documentIsHTML) {
                    var elem = context.getElementById(id);
                    return elem ? [elem] : [];
                  }
                };
              } else {
                Expr.filter.ID = function(id) {
                  var attrId = id.replace(runescape, funescape);
                  return function(elem) {
                    var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
                    return node2 && node2.value === attrId;
                  };
                };
                Expr.find.ID = function(id, context) {
                  if (typeof context.getElementById !== "undefined" && documentIsHTML) {
                    var node2, i2, elems, elem = context.getElementById(id);
                    if (elem) {
                      node2 = elem.getAttributeNode("id");
                      if (node2 && node2.value === id) {
                        return [elem];
                      }
                      elems = context.getElementsByName(id);
                      i2 = 0;
                      while (elem = elems[i2++]) {
                        node2 = elem.getAttributeNode("id");
                        if (node2 && node2.value === id) {
                          return [elem];
                        }
                      }
                    }
                    return [];
                  }
                };
              }
              Expr.find.TAG = function(tag, context) {
                if (typeof context.getElementsByTagName !== "undefined") {
                  return context.getElementsByTagName(tag);
                } else {
                  return context.querySelectorAll(tag);
                }
              };
              Expr.find.CLASS = function(className, context) {
                if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
                  return context.getElementsByClassName(className);
                }
              };
              rbuggyQSA = [];
              assert(function(el) {
                var input;
                documentElement2.appendChild(el).innerHTML = "<a id='" + expando + "' href='' disabled='disabled'></a><select id='" + expando + "-\r\\' disabled='disabled'><option selected=''></option></select>";
                if (!el.querySelectorAll("[selected]").length) {
                  rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
                }
                if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
                  rbuggyQSA.push("~=");
                }
                if (!el.querySelectorAll("a#" + expando + "+*").length) {
                  rbuggyQSA.push(".#.+[+~]");
                }
                if (!el.querySelectorAll(":checked").length) {
                  rbuggyQSA.push(":checked");
                }
                input = document3.createElement("input");
                input.setAttribute("type", "hidden");
                el.appendChild(input).setAttribute("name", "D");
                documentElement2.appendChild(el).disabled = true;
                if (el.querySelectorAll(":disabled").length !== 2) {
                  rbuggyQSA.push(":enabled", ":disabled");
                }
                input = document3.createElement("input");
                input.setAttribute("name", "");
                el.appendChild(input);
                if (!el.querySelectorAll("[name='']").length) {
                  rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + `*(?:''|"")`);
                }
              });
              if (!support.cssHas) {
                rbuggyQSA.push(":has");
              }
              rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
              sortOrder = function(a, b) {
                if (a === b) {
                  hasDuplicate = true;
                  return 0;
                }
                var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
                if (compare) {
                  return compare;
                }
                compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : (
                  // Otherwise we know they are disconnected
                  1
                );
                if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
                  if (a === document3 || a.ownerDocument == preferredDoc && find2.contains(preferredDoc, a)) {
                    return -1;
                  }
                  if (b === document3 || b.ownerDocument == preferredDoc && find2.contains(preferredDoc, b)) {
                    return 1;
                  }
                  return sortInput ? indexOf2.call(sortInput, a) - indexOf2.call(sortInput, b) : 0;
                }
                return compare & 4 ? -1 : 1;
              };
              return document3;
            }
            find2.matches = function(expr, elements) {
              return find2(expr, null, null, elements);
            };
            find2.matchesSelector = function(elem, expr) {
              setDocument(elem);
              if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
                try {
                  var ret = matches.call(elem, expr);
                  if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document
                  // fragment in IE 9
                  elem.document && elem.document.nodeType !== 11) {
                    return ret;
                  }
                } catch (e) {
                  nonnativeSelectorCache(expr, true);
                }
              }
              return find2(expr, document3, null, [elem]).length > 0;
            };
            find2.contains = function(context, elem) {
              if ((context.ownerDocument || context) != document3) {
                setDocument(context);
              }
              return jQuery.contains(context, elem);
            };
            find2.attr = function(elem, name) {
              if ((elem.ownerDocument || elem) != document3) {
                setDocument(elem);
              }
              var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn2.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
              if (val !== void 0) {
                return val;
              }
              return elem.getAttribute(name);
            };
            find2.error = function(msg2) {
              throw new Error("Syntax error, unrecognized expression: " + msg2);
            };
            jQuery.uniqueSort = function(results) {
              var elem, duplicates = [], j = 0, i2 = 0;
              hasDuplicate = !support.sortStable;
              sortInput = !support.sortStable && slice.call(results, 0);
              sort.call(results, sortOrder);
              if (hasDuplicate) {
                while (elem = results[i2++]) {
                  if (elem === results[i2]) {
                    j = duplicates.push(i2);
                  }
                }
                while (j--) {
                  splice2.call(results, duplicates[j], 1);
                }
              }
              sortInput = null;
              return results;
            };
            jQuery.fn.uniqueSort = function() {
              return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
            };
            Expr = jQuery.expr = {
              // Can be adjusted by the user
              cacheLength: 50,
              createPseudo: markFunction,
              match: matchExpr,
              attrHandle: {},
              find: {},
              relative: {
                ">": { dir: "parentNode", first: true },
                " ": { dir: "parentNode" },
                "+": { dir: "previousSibling", first: true },
                "~": { dir: "previousSibling" }
              },
              preFilter: {
                ATTR: function(match) {
                  match[1] = match[1].replace(runescape, funescape);
                  match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
                  if (match[2] === "~=") {
                    match[3] = " " + match[3] + " ";
                  }
                  return match.slice(0, 4);
                },
                CHILD: function(match) {
                  match[1] = match[1].toLowerCase();
                  if (match[1].slice(0, 3) === "nth") {
                    if (!match[3]) {
                      find2.error(match[0]);
                    }
                    match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
                    match[5] = +(match[7] + match[8] || match[3] === "odd");
                  } else if (match[3]) {
                    find2.error(match[0]);
                  }
                  return match;
                },
                PSEUDO: function(match) {
                  var excess, unquoted = !match[6] && match[2];
                  if (matchExpr.CHILD.test(match[0])) {
                    return null;
                  }
                  if (match[3]) {
                    match[2] = match[4] || match[5] || "";
                  } else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively)
                  (excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis
                  (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
                    match[0] = match[0].slice(0, excess);
                    match[2] = unquoted.slice(0, excess);
                  }
                  return match.slice(0, 3);
                }
              },
              filter: {
                TAG: function(nodeNameSelector) {
                  var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
                  return nodeNameSelector === "*" ? function() {
                    return true;
                  } : function(elem) {
                    return nodeName(elem, expectedNodeName);
                  };
                },
                CLASS: function(className) {
                  var pattern = classCache[className + " "];
                  return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
                    return pattern.test(
                      typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""
                    );
                  });
                },
                ATTR: function(name, operator, check) {
                  return function(elem) {
                    var result = find2.attr(elem, name);
                    if (result == null) {
                      return operator === "!=";
                    }
                    if (!operator) {
                      return true;
                    }
                    result += "";
                    if (operator === "=") {
                      return result === check;
                    }
                    if (operator === "!=") {
                      return result !== check;
                    }
                    if (operator === "^=") {
                      return check && result.indexOf(check) === 0;
                    }
                    if (operator === "*=") {
                      return check && result.indexOf(check) > -1;
                    }
                    if (operator === "$=") {
                      return check && result.slice(-check.length) === check;
                    }
                    if (operator === "~=") {
                      return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1;
                    }
                    if (operator === "|=") {
                      return result === check || result.slice(0, check.length + 1) === check + "-";
                    }
                    return false;
                  };
                },
                CHILD: function(type, what, _argument, first, last) {
                  var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type";
                  return first === 1 && last === 0 ? (
                    // Shortcut for :nth-*(n)
                    function(elem) {
                      return !!elem.parentNode;
                    }
                  ) : function(elem, _context, xml) {
                    var cache2, outerCache, node, nodeIndex, start, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
                    if (parent) {
                      if (simple) {
                        while (dir2) {
                          node = elem;
                          while (node = node[dir2]) {
                            if (ofType ? nodeName(node, name) : node.nodeType === 1) {
                              return false;
                            }
                          }
                          start = dir2 = type === "only" && !start && "nextSibling";
                        }
                        return true;
                      }
                      start = [forward ? parent.firstChild : parent.lastChild];
                      if (forward && useCache) {
                        outerCache = parent[expando] || (parent[expando] = {});
                        cache2 = outerCache[type] || [];
                        nodeIndex = cache2[0] === dirruns && cache2[1];
                        diff = nodeIndex && cache2[2];
                        node = nodeIndex && parent.childNodes[nodeIndex];
                        while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start
                        (diff = nodeIndex = 0) || start.pop()) {
                          if (node.nodeType === 1 && ++diff && node === elem) {
                            outerCache[type] = [dirruns, nodeIndex, diff];
                            break;
                          }
                        }
                      } else {
                        if (useCache) {
                          outerCache = elem[expando] || (elem[expando] = {});
                          cache2 = outerCache[type] || [];
                          nodeIndex = cache2[0] === dirruns && cache2[1];
                          diff = nodeIndex;
                        }
                        if (diff === false) {
                          while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) {
                            if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) {
                              if (useCache) {
                                outerCache = node[expando] || (node[expando] = {});
                                outerCache[type] = [dirruns, diff];
                              }
                              if (node === elem) {
                                break;
                              }
                            }
                          }
                        }
                      }
                      diff -= last;
                      return diff === first || diff % first === 0 && diff / first >= 0;
                    }
                  };
                },
                PSEUDO: function(pseudo, argument) {
                  var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find2.error("unsupported pseudo: " + pseudo);
                  if (fn[expando]) {
                    return fn(argument);
                  }
                  if (fn.length > 1) {
                    args = [pseudo, pseudo, "", argument];
                    return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches2) {
                      var idx, matched = fn(seed, argument), i2 = matched.length;
                      while (i2--) {
                        idx = indexOf2.call(seed, matched[i2]);
                        seed[idx] = !(matches2[idx] = matched[i2]);
                      }
                    }) : function(elem) {
                      return fn(elem, 0, args);
                    };
                  }
                  return fn;
                }
              },
              pseudos: {
                // Potentially complex pseudos
                not: markFunction(function(selector) {
                  var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1"));
                  return matcher[expando] ? markFunction(function(seed, matches2, _context, xml) {
                    var elem, unmatched = matcher(seed, null, xml, []), i2 = seed.length;
                    while (i2--) {
                      if (elem = unmatched[i2]) {
                        seed[i2] = !(matches2[i2] = elem);
                      }
                    }
                  }) : function(elem, _context, xml) {
                    input[0] = elem;
                    matcher(input, null, xml, results);
                    input[0] = null;
                    return !results.pop();
                  };
                }),
                has: markFunction(function(selector) {
                  return function(elem) {
                    return find2(selector, elem).length > 0;
                  };
                }),
                contains: markFunction(function(text) {
                  text = text.replace(runescape, funescape);
                  return function(elem) {
                    return (elem.textContent || jQuery.text(elem)).indexOf(text) > -1;
                  };
                }),
                // "Whether an element is represented by a :lang() selector
                // is based solely on the element's language value
                // being equal to the identifier C,
                // or beginning with the identifier C immediately followed by "-".
                // The matching of C against the element's language value is performed case-insensitively.
                // The identifier C does not have to be a valid language name."
                // https://www.w3.org/TR/selectors/#lang-pseudo
                lang: markFunction(function(lang) {
                  if (!ridentifier.test(lang || "")) {
                    find2.error("unsupported lang: " + lang);
                  }
                  lang = lang.replace(runescape, funescape).toLowerCase();
                  return function(elem) {
                    var elemLang;
                    do {
                      if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
                        elemLang = elemLang.toLowerCase();
                        return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
                      }
                    } while ((elem = elem.parentNode) && elem.nodeType === 1);
                    return false;
                  };
                }),
                // Miscellaneous
                target: function(elem) {
                  var hash = window2.location && window2.location.hash;
                  return hash && hash.slice(1) === elem.id;
                },
                root: function(elem) {
                  return elem === documentElement2;
                },
                focus: function(elem) {
                  return elem === safeActiveElement() && document3.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex);
                },
                // Boolean properties
                enabled: createDisabledPseudo(false),
                disabled: createDisabledPseudo(true),
                checked: function(elem) {
                  return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected;
                },
                selected: function(elem) {
                  if (elem.parentNode) {
                    elem.parentNode.selectedIndex;
                  }
                  return elem.selected === true;
                },
                // Contents
                empty: function(elem) {
                  for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
                    if (elem.nodeType < 6) {
                      return false;
                    }
                  }
                  return true;
                },
                parent: function(elem) {
                  return !Expr.pseudos.empty(elem);
                },
                // Element/input types
                header: function(elem) {
                  return rheader.test(elem.nodeName);
                },
                input: function(elem) {
                  return rinputs.test(elem.nodeName);
                },
                button: function(elem) {
                  return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button");
                },
                text: function(elem) {
                  var attr;
                  return nodeName(elem, "input") && elem.type === "text" && // Support: IE <10 only
                  // New HTML5 attribute values (e.g., "search") appear
                  // with elem.type === "text"
                  ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
                },
                // Position-in-collection
                first: createPositionalPseudo(function() {
                  return [0];
                }),
                last: createPositionalPseudo(function(_matchIndexes, length) {
                  return [length - 1];
                }),
                eq: createPositionalPseudo(function(_matchIndexes, length, argument) {
                  return [argument < 0 ? argument + length : argument];
                }),
                even: createPositionalPseudo(function(matchIndexes, length) {
                  var i2 = 0;
                  for (; i2 < length; i2 += 2) {
                    matchIndexes.push(i2);
                  }
                  return matchIndexes;
                }),
                odd: createPositionalPseudo(function(matchIndexes, length) {
                  var i2 = 1;
                  for (; i2 < length; i2 += 2) {
                    matchIndexes.push(i2);
                  }
                  return matchIndexes;
                }),
                lt: createPositionalPseudo(function(matchIndexes, length, argument) {
                  var i2;
                  if (argument < 0) {
                    i2 = argument + length;
                  } else if (argument > length) {
                    i2 = length;
                  } else {
                    i2 = argument;
                  }
                  for (; --i2 >= 0; ) {
                    matchIndexes.push(i2);
                  }
                  return matchIndexes;
                }),
                gt: createPositionalPseudo(function(matchIndexes, length, argument) {
                  var i2 = argument < 0 ? argument + length : argument;
                  for (; ++i2 < length; ) {
                    matchIndexes.push(i2);
                  }
                  return matchIndexes;
                })
              }
            };
            Expr.pseudos.nth = Expr.pseudos.eq;
            for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) {
              Expr.pseudos[i] = createInputPseudo(i);
            }
            for (i in { submit: true, reset: true }) {
              Expr.pseudos[i] = createButtonPseudo(i);
            }
            function setFilters() {
            }
            setFilters.prototype = Expr.filters = Expr.pseudos;
            Expr.setFilters = new setFilters();
            function tokenize(selector, parseOnly) {
              var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
              if (cached) {
                return parseOnly ? 0 : cached.slice(0);
              }
              soFar = selector;
              groups = [];
              preFilters = Expr.preFilter;
              while (soFar) {
                if (!matched || (match = rcomma.exec(soFar))) {
                  if (match) {
                    soFar = soFar.slice(match[0].length) || soFar;
                  }
                  groups.push(tokens = []);
                }
                matched = false;
                if (match = rleadingCombinator.exec(soFar)) {
                  matched = match.shift();
                  tokens.push({
                    value: matched,
                    // Cast descendant combinators to space
                    type: match[0].replace(rtrimCSS, " ")
                  });
                  soFar = soFar.slice(matched.length);
                }
                for (type in Expr.filter) {
                  if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
                    matched = match.shift();
                    tokens.push({
                      value: matched,
                      type,
                      matches: match
                    });
                    soFar = soFar.slice(matched.length);
                  }
                }
                if (!matched) {
                  break;
                }
              }
              if (parseOnly) {
                return soFar.length;
              }
              return soFar ? find2.error(selector) : (
                // Cache the tokens
                tokenCache(selector, groups).slice(0)
              );
            }
            function toSelector(tokens) {
              var i2 = 0, len = tokens.length, selector = "";
              for (; i2 < len; i2++) {
                selector += tokens[i2].value;
              }
              return selector;
            }
            function addCombinator(matcher, combinator, base2) {
              var dir2 = combinator.dir, skip = combinator.next, key = skip || dir2, checkNonElements = base2 && key === "parentNode", doneName = done++;
              return combinator.first ? (
                // Check against closest ancestor/preceding element
                function(elem, context, xml) {
                  while (elem = elem[dir2]) {
                    if (elem.nodeType === 1 || checkNonElements) {
                      return matcher(elem, context, xml);
                    }
                  }
                  return false;
                }
              ) : (
                // Check against all ancestor/preceding elements
                function(elem, context, xml) {
                  var oldCache, outerCache, newCache = [dirruns, doneName];
                  if (xml) {
                    while (elem = elem[dir2]) {
                      if (elem.nodeType === 1 || checkNonElements) {
                        if (matcher(elem, context, xml)) {
                          return true;
                        }
                      }
                    }
                  } else {
                    while (elem = elem[dir2]) {
                      if (elem.nodeType === 1 || checkNonElements) {
                        outerCache = elem[expando] || (elem[expando] = {});
                        if (skip && nodeName(elem, skip)) {
                          elem = elem[dir2] || elem;
                        } else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
                          return newCache[2] = oldCache[2];
                        } else {
                          outerCache[key] = newCache;
                          if (newCache[2] = matcher(elem, context, xml)) {
                            return true;
                          }
                        }
                      }
                    }
                  }
                  return false;
                }
              );
            }
            function elementMatcher(matchers) {
              return matchers.length > 1 ? function(elem, context, xml) {
                var i2 = matchers.length;
                while (i2--) {
                  if (!matchers[i2](elem, context, xml)) {
                    return false;
                  }
                }
                return true;
              } : matchers[0];
            }
            function multipleContexts(selector, contexts, results) {
              var i2 = 0, len = contexts.length;
              for (; i2 < len; i2++) {
                find2(selector, contexts[i2], results);
              }
              return results;
            }
            function condense(unmatched, map, filter, context, xml) {
              var elem, newUnmatched = [], i2 = 0, len = unmatched.length, mapped = map != null;
              for (; i2 < len; i2++) {
                if (elem = unmatched[i2]) {
                  if (!filter || filter(elem, context, xml)) {
                    newUnmatched.push(elem);
                    if (mapped) {
                      map.push(i2);
                    }
                  }
                }
              }
              return newUnmatched;
            }
            function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
              if (postFilter && !postFilter[expando]) {
                postFilter = setMatcher(postFilter);
              }
              if (postFinder && !postFinder[expando]) {
                postFinder = setMatcher(postFinder, postSelector);
              }
              return markFunction(function(seed, results, context, xml) {
                var temp, i2, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(
                  selector || "*",
                  context.nodeType ? [context] : context,
                  []
                ), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems;
                if (matcher) {
                  matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? (
                    // ...intermediate processing is necessary
                    []
                  ) : (
                    // ...otherwise use results directly
                    results
                  );
                  matcher(matcherIn, matcherOut, context, xml);
                } else {
                  matcherOut = matcherIn;
                }
                if (postFilter) {
                  temp = condense(matcherOut, postMap);
                  postFilter(temp, [], context, xml);
                  i2 = temp.length;
                  while (i2--) {
                    if (elem = temp[i2]) {
                      matcherOut[postMap[i2]] = !(matcherIn[postMap[i2]] = elem);
                    }
                  }
                }
                if (seed) {
                  if (postFinder || preFilter) {
                    if (postFinder) {
                      temp = [];
                      i2 = matcherOut.length;
                      while (i2--) {
                        if (elem = matcherOut[i2]) {
                          temp.push(matcherIn[i2] = elem);
                        }
                      }
                      postFinder(null, matcherOut = [], temp, xml);
                    }
                    i2 = matcherOut.length;
                    while (i2--) {
                      if ((elem = matcherOut[i2]) && (temp = postFinder ? indexOf2.call(seed, elem) : preMap[i2]) > -1) {
                        seed[temp] = !(results[temp] = elem);
                      }
                    }
                  }
                } else {
                  matcherOut = condense(
                    matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut
                  );
                  if (postFinder) {
                    postFinder(null, results, matcherOut, xml);
                  } else {
                    push3.apply(results, matcherOut);
                  }
                }
              });
            }
            function matcherFromTokens(tokens) {
              var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i2 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) {
                return elem === checkContext;
              }, implicitRelative, true), matchAnyContext = addCombinator(function(elem) {
                return indexOf2.call(checkContext, elem) > -1;
              }, implicitRelative, true), matchers = [function(elem, context, xml) {
                var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
                checkContext = null;
                return ret;
              }];
              for (; i2 < len; i2++) {
                if (matcher = Expr.relative[tokens[i2].type]) {
                  matchers = [addCombinator(elementMatcher(matchers), matcher)];
                } else {
                  matcher = Expr.filter[tokens[i2].type].apply(null, tokens[i2].matches);
                  if (matcher[expando]) {
                    j = ++i2;
                    for (; j < len; j++) {
                      if (Expr.relative[tokens[j].type]) {
                        break;
                      }
                    }
                    return setMatcher(
                      i2 > 1 && elementMatcher(matchers),
                      i2 > 1 && toSelector(
                        // If the preceding token was a descendant combinator, insert an implicit any-element `*`
                        tokens.slice(0, i2 - 1).concat({ value: tokens[i2 - 2].type === " " ? "*" : "" })
                      ).replace(rtrimCSS, "$1"),
                      matcher,
                      i2 < j && matcherFromTokens(tokens.slice(i2, j)),
                      j < len && matcherFromTokens(tokens = tokens.slice(j)),
                      j < len && toSelector(tokens)
                    );
                  }
                  matchers.push(matcher);
                }
              }
              return elementMatcher(matchers);
            }
            function matcherFromGroupMatchers(elementMatchers, setMatchers) {
              var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) {
                var elem, j, matcher, matchedCount = 0, i2 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
                if (outermost) {
                  outermostContext = context == document3 || context || outermost;
                }
                for (; i2 !== len && (elem = elems[i2]) != null; i2++) {
                  if (byElement && elem) {
                    j = 0;
                    if (!context && elem.ownerDocument != document3) {
                      setDocument(elem);
                      xml = !documentIsHTML;
                    }
                    while (matcher = elementMatchers[j++]) {
                      if (matcher(elem, context || document3, xml)) {
                        push3.call(results, elem);
                        break;
                      }
                    }
                    if (outermost) {
                      dirruns = dirrunsUnique;
                    }
                  }
                  if (bySet) {
                    if (elem = !matcher && elem) {
                      matchedCount--;
                    }
                    if (seed) {
                      unmatched.push(elem);
                    }
                  }
                }
                matchedCount += i2;
                if (bySet && i2 !== matchedCount) {
                  j = 0;
                  while (matcher = setMatchers[j++]) {
                    matcher(unmatched, setMatched, context, xml);
                  }
                  if (seed) {
                    if (matchedCount > 0) {
                      while (i2--) {
                        if (!(unmatched[i2] || setMatched[i2])) {
                          setMatched[i2] = pop.call(results);
                        }
                      }
                    }
                    setMatched = condense(setMatched);
                  }
                  push3.apply(results, setMatched);
                  if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
                    jQuery.uniqueSort(results);
                  }
                }
                if (outermost) {
                  dirruns = dirrunsUnique;
                  outermostContext = contextBackup;
                }
                return unmatched;
              };
              return bySet ? markFunction(superMatcher) : superMatcher;
            }
            function compile(selector, match) {
              var i2, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "];
              if (!cached) {
                if (!match) {
                  match = tokenize(selector);
                }
                i2 = match.length;
                while (i2--) {
                  cached = matcherFromTokens(match[i2]);
                  if (cached[expando]) {
                    setMatchers.push(cached);
                  } else {
                    elementMatchers.push(cached);
                  }
                }
                cached = compilerCache(
                  selector,
                  matcherFromGroupMatchers(elementMatchers, setMatchers)
                );
                cached.selector = selector;
              }
              return cached;
            }
            function select(selector, context, results, seed) {
              var i2, tokens, token, type, find3, compiled = typeof selector === "function" && selector, match = !seed && tokenize(selector = compiled.selector || selector);
              results = results || [];
              if (match.length === 1) {
                tokens = match[0] = match[0].slice(0);
                if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
                  context = (Expr.find.ID(
                    token.matches[0].replace(runescape, funescape),
                    context
                  ) || [])[0];
                  if (!context) {
                    return results;
                  } else if (compiled) {
                    context = context.parentNode;
                  }
                  selector = selector.slice(tokens.shift().value.length);
                }
                i2 = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
                while (i2--) {
                  token = tokens[i2];
                  if (Expr.relative[type = token.type]) {
                    break;
                  }
                  if (find3 = Expr.find[type]) {
                    if (seed = find3(
                      token.matches[0].replace(runescape, funescape),
                      rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
                    )) {
                      tokens.splice(i2, 1);
                      selector = seed.length && toSelector(tokens);
                      if (!selector) {
                        push3.apply(results, seed);
                        return results;
                      }
                      break;
                    }
                  }
                }
              }
              (compiled || compile(selector, match))(
                seed,
                context,
                !documentIsHTML,
                results,
                !context || rsibling.test(selector) && testContext(context.parentNode) || context
              );
              return results;
            }
            support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
            setDocument();
            support.sortDetached = assert(function(el) {
              return el.compareDocumentPosition(document3.createElement("fieldset")) & 1;
            });
            jQuery.find = find2;
            jQuery.expr[":"] = jQuery.expr.pseudos;
            jQuery.unique = jQuery.uniqueSort;
            find2.compile = compile;
            find2.select = select;
            find2.setDocument = setDocument;
            find2.tokenize = tokenize;
            find2.escape = jQuery.escapeSelector;
            find2.getText = jQuery.text;
            find2.isXML = jQuery.isXMLDoc;
            find2.selectors = jQuery.expr;
            find2.support = jQuery.support;
            find2.uniqueSort = jQuery.uniqueSort;
          })();
          var dir = function(elem, dir2, until) {
            var matched = [], truncate = until !== void 0;
            while ((elem = elem[dir2]) && elem.nodeType !== 9) {
              if (elem.nodeType === 1) {
                if (truncate && jQuery(elem).is(until)) {
                  break;
                }
                matched.push(elem);
              }
            }
            return matched;
          };
          var siblings = function(n, elem) {
            var matched = [];
            for (; n; n = n.nextSibling) {
              if (n.nodeType === 1 && n !== elem) {
                matched.push(n);
              }
            }
            return matched;
          };
          var rneedsContext = jQuery.expr.match.needsContext;
          var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
          function winnow(elements, qualifier, not) {
            if (isFunction2(qualifier)) {
              return jQuery.grep(elements, function(elem, i) {
                return !!qualifier.call(elem, i, elem) !== not;
              });
            }
            if (qualifier.nodeType) {
              return jQuery.grep(elements, function(elem) {
                return elem === qualifier !== not;
              });
            }
            if (typeof qualifier !== "string") {
              return jQuery.grep(elements, function(elem) {
                return indexOf2.call(qualifier, elem) > -1 !== not;
              });
            }
            return jQuery.filter(qualifier, elements, not);
          }
          jQuery.filter = function(expr, elems, not) {
            var elem = elems[0];
            if (not) {
              expr = ":not(" + expr + ")";
            }
            if (elems.length === 1 && elem.nodeType === 1) {
              return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
            }
            return jQuery.find.matches(expr, jQuery.grep(elems, function(elem2) {
              return elem2.nodeType === 1;
            }));
          };
          jQuery.fn.extend({
            find: function(selector) {
              var i, ret, len = this.length, self2 = this;
              if (typeof selector !== "string") {
                return this.pushStack(jQuery(selector).filter(function() {
                  for (i = 0; i < len; i++) {
                    if (jQuery.contains(self2[i], this)) {
                      return true;
                    }
                  }
                }));
              }
              ret = this.pushStack([]);
              for (i = 0; i < len; i++) {
                jQuery.find(selector, self2[i], ret);
              }
              return len > 1 ? jQuery.uniqueSort(ret) : ret;
            },
            filter: function(selector) {
              return this.pushStack(winnow(this, selector || [], false));
            },
            not: function(selector) {
              return this.pushStack(winnow(this, selector || [], true));
            },
            is: function(selector) {
              return !!winnow(
                this,
                // If this is a positional/relative selector, check membership in the returned set
                // so $("p:first").is("p:last") won't return true for a doc with two "p".
                typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [],
                false
              ).length;
            }
          });
          var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init2 = jQuery.fn.init = function(selector, context, root2) {
            var match, elem;
            if (!selector) {
              return this;
            }
            root2 = root2 || rootjQuery;
            if (typeof selector === "string") {
              if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
                match = [null, selector, null];
              } else {
                match = rquickExpr.exec(selector);
              }
              if (match && (match[1] || !context)) {
                if (match[1]) {
                  context = context instanceof jQuery ? context[0] : context;
                  jQuery.merge(this, jQuery.parseHTML(
                    match[1],
                    context && context.nodeType ? context.ownerDocument || context : document2,
                    true
                  ));
                  if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
                    for (match in context) {
                      if (isFunction2(this[match])) {
                        this[match](context[match]);
                      } else {
                        this.attr(match, context[match]);
                      }
                    }
                  }
                  return this;
                } else {
                  elem = document2.getElementById(match[2]);
                  if (elem) {
                    this[0] = elem;
                    this.length = 1;
                  }
                  return this;
                }
              } else if (!context || context.jquery) {
                return (context || root2).find(selector);
              } else {
                return this.constructor(context).find(selector);
              }
            } else if (selector.nodeType) {
              this[0] = selector;
              this.length = 1;
              return this;
            } else if (isFunction2(selector)) {
              return root2.ready !== void 0 ? root2.ready(selector) : (
                // Execute immediately if ready is not present
                selector(jQuery)
              );
            }
            return jQuery.makeArray(selector, this);
          };
          init2.prototype = jQuery.fn;
          rootjQuery = jQuery(document2);
          var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = {
            children: true,
            contents: true,
            next: true,
            prev: true
          };
          jQuery.fn.extend({
            has: function(target) {
              var targets = jQuery(target, this), l = targets.length;
              return this.filter(function() {
                var i = 0;
                for (; i < l; i++) {
                  if (jQuery.contains(this, targets[i])) {
                    return true;
                  }
                }
              });
            },
            closest: function(selectors, context) {
              var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery(selectors);
              if (!rneedsContext.test(selectors)) {
                for (; i < l; i++) {
                  for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
                    if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : (
                      // Don't pass non-elements to jQuery#find
                      cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)
                    ))) {
                      matched.push(cur);
                      break;
                    }
                  }
                }
              }
              return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
            },
            // Determine the position of an element within the set
            index: function(elem) {
              if (!elem) {
                return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
              }
              if (typeof elem === "string") {
                return indexOf2.call(jQuery(elem), this[0]);
              }
              return indexOf2.call(
                this,
                // If it receives a jQuery object, the first element is used
                elem.jquery ? elem[0] : elem
              );
            },
            add: function(selector, context) {
              return this.pushStack(
                jQuery.uniqueSort(
                  jQuery.merge(this.get(), jQuery(selector, context))
                )
              );
            },
            addBack: function(selector) {
              return this.add(
                selector == null ? this.prevObject : this.prevObject.filter(selector)
              );
            }
          });
          function sibling(cur, dir2) {
            while ((cur = cur[dir2]) && cur.nodeType !== 1) {
            }
            return cur;
          }
          jQuery.each({
            parent: function(elem) {
              var parent = elem.parentNode;
              return parent && parent.nodeType !== 11 ? parent : null;
            },
            parents: function(elem) {
              return dir(elem, "parentNode");
            },
            parentsUntil: function(elem, _i, until) {
              return dir(elem, "parentNode", until);
            },
            next: function(elem) {
              return sibling(elem, "nextSibling");
            },
            prev: function(elem) {
              return sibling(elem, "previousSibling");
            },
            nextAll: function(elem) {
              return dir(elem, "nextSibling");
            },
            prevAll: function(elem) {
              return dir(elem, "previousSibling");
            },
            nextUntil: function(elem, _i, until) {
              return dir(elem, "nextSibling", until);
            },
            prevUntil: function(elem, _i, until) {
              return dir(elem, "previousSibling", until);
            },
            siblings: function(elem) {
              return siblings((elem.parentNode || {}).firstChild, elem);
            },
            children: function(elem) {
              return siblings(elem.firstChild);
            },
            contents: function(elem) {
              if (elem.contentDocument != null && // Support: IE 11+
              // <object> elements with no `data` attribute has an object
              // `contentDocument` with a `null` prototype.
              getProto2(elem.contentDocument)) {
                return elem.contentDocument;
              }
              if (nodeName(elem, "template")) {
                elem = elem.content || elem;
              }
              return jQuery.merge([], elem.childNodes);
            }
          }, function(name, fn) {
            jQuery.fn[name] = function(until, selector) {
              var matched = jQuery.map(this, fn, until);
              if (name.slice(-5) !== "Until") {
                selector = until;
              }
              if (selector && typeof selector === "string") {
                matched = jQuery.filter(selector, matched);
              }
              if (this.length > 1) {
                if (!guaranteedUnique[name]) {
                  jQuery.uniqueSort(matched);
                }
                if (rparentsprev.test(name)) {
                  matched.reverse();
                }
              }
              return this.pushStack(matched);
            };
          });
          var rnothtmlwhite = /[^\x20\t\r\n\f]+/g;
          function createOptions(options) {
            var object = {};
            jQuery.each(options.match(rnothtmlwhite) || [], function(_, flag) {
              object[flag] = true;
            });
            return object;
          }
          jQuery.Callbacks = function(options) {
            options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options);
            var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire = function() {
              locked = locked || options.once;
              fired = firing = true;
              for (; queue.length; firingIndex = -1) {
                memory = queue.shift();
                while (++firingIndex < list.length) {
                  if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {
                    firingIndex = list.length;
                    memory = false;
                  }
                }
              }
              if (!options.memory) {
                memory = false;
              }
              firing = false;
              if (locked) {
                if (memory) {
                  list = [];
                } else {
                  list = "";
                }
              }
            }, self2 = {
              // Add a callback or a collection of callbacks to the list
              add: function() {
                if (list) {
                  if (memory && !firing) {
                    firingIndex = list.length - 1;
                    queue.push(memory);
                  }
                  (function add(args) {
                    jQuery.each(args, function(_, arg) {
                      if (isFunction2(arg)) {
                        if (!options.unique || !self2.has(arg)) {
                          list.push(arg);
                        }
                      } else if (arg && arg.length && toType(arg) !== "string") {
                        add(arg);
                      }
                    });
                  })(arguments);
                  if (memory && !firing) {
                    fire();
                  }
                }
                return this;
              },
              // Remove a callback from the list
              remove: function() {
                jQuery.each(arguments, function(_, arg) {
                  var index;
                  while ((index = jQuery.inArray(arg, list, index)) > -1) {
                    list.splice(index, 1);
                    if (index <= firingIndex) {
                      firingIndex--;
                    }
                  }
                });
                return this;
              },
              // Check if a given callback is in the list.
              // If no argument is given, return whether or not list has callbacks attached.
              has: function(fn) {
                return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;
              },
              // Remove all callbacks from the list
              empty: function() {
                if (list) {
                  list = [];
                }
                return this;
              },
              // Disable .fire and .add
              // Abort any current/pending executions
              // Clear all callbacks and values
              disable: function() {
                locked = queue = [];
                list = memory = "";
                return this;
              },
              disabled: function() {
                return !list;
              },
              // Disable .fire
              // Also disable .add unless we have memory (since it would have no effect)
              // Abort any pending executions
              lock: function() {
                locked = queue = [];
                if (!memory && !firing) {
                  list = memory = "";
                }
                return this;
              },
              locked: function() {
                return !!locked;
              },
              // Call all callbacks with the given context and arguments
              fireWith: function(context, args) {
                if (!locked) {
                  args = args || [];
                  args = [context, args.slice ? args.slice() : args];
                  queue.push(args);
                  if (!firing) {
                    fire();
                  }
                }
                return this;
              },
              // Call all the callbacks with the given arguments
              fire: function() {
                self2.fireWith(this, arguments);
                return this;
              },
              // To know if the callbacks have already been called at least once
              fired: function() {
                return !!fired;
              }
            };
            return self2;
          };
          function Identity(v) {
            return v;
          }
          function Thrower(ex) {
            throw ex;
          }
          function adoptValue(value, resolve, reject, noValue) {
            var method;
            try {
              if (value && isFunction2(method = value.promise)) {
                method.call(value).done(resolve).fail(reject);
              } else if (value && isFunction2(method = value.then)) {
                method.call(value, resolve, reject);
              } else {
                resolve.apply(void 0, [value].slice(noValue));
              }
            } catch (value2) {
              reject.apply(void 0, [value2]);
            }
          }
          jQuery.extend({
            Deferred: function(func) {
              var tuples = [
                // action, add listener, callbacks,
                // ... .then handlers, argument index, [final state]
                [
                  "notify",
                  "progress",
                  jQuery.Callbacks("memory"),
                  jQuery.Callbacks("memory"),
                  2
                ],
                [
                  "resolve",
                  "done",
                  jQuery.Callbacks("once memory"),
                  jQuery.Callbacks("once memory"),
                  0,
                  "resolved"
                ],
                [
                  "reject",
                  "fail",
                  jQuery.Callbacks("once memory"),
                  jQuery.Callbacks("once memory"),
                  1,
                  "rejected"
                ]
              ], state = "pending", promise = {
                state: function() {
                  return state;
                },
                always: function() {
                  deferred.done(arguments).fail(arguments);
                  return this;
                },
                "catch": function(fn) {
                  return promise.then(null, fn);
                },
                // Keep pipe for back-compat
                pipe: function() {
                  var fns = arguments;
                  return jQuery.Deferred(function(newDefer) {
                    jQuery.each(tuples, function(_i, tuple) {
                      var fn = isFunction2(fns[tuple[4]]) && fns[tuple[4]];
                      deferred[tuple[1]](function() {
                        var returned = fn && fn.apply(this, arguments);
                        if (returned && isFunction2(returned.promise)) {
                          returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
                        } else {
                          newDefer[tuple[0] + "With"](
                            this,
                            fn ? [returned] : arguments
                          );
                        }
                      });
                    });
                    fns = null;
                  }).promise();
                },
                then: function(onFulfilled, onRejected, onProgress) {
                  var maxDepth = 0;
                  function resolve(depth, deferred2, handler, special) {
                    return function() {
                      var that = this, args = arguments, mightThrow = function() {
                        var returned, then;
                        if (depth < maxDepth) {
                          return;
                        }
                        returned = handler.apply(that, args);
                        if (returned === deferred2.promise()) {
                          throw new TypeError("Thenable self-resolution");
                        }
                        then = returned && // Support: Promises/A+ section 2.3.4
                        // https://promisesaplus.com/#point-64
                        // Only check objects and functions for thenability
                        (typeof returned === "object" || typeof returned === "function") && returned.then;
                        if (isFunction2(then)) {
                          if (special) {
                            then.call(
                              returned,
                              resolve(maxDepth, deferred2, Identity, special),
                              resolve(maxDepth, deferred2, Thrower, special)
                            );
                          } else {
                            maxDepth++;
                            then.call(
                              returned,
                              resolve(maxDepth, deferred2, Identity, special),
                              resolve(maxDepth, deferred2, Thrower, special),
                              resolve(
                                maxDepth,
                                deferred2,
                                Identity,
                                deferred2.notifyWith
                              )
                            );
                          }
                        } else {
                          if (handler !== Identity) {
                            that = void 0;
                            args = [returned];
                          }
                          (special || deferred2.resolveWith)(that, args);
                        }
                      }, process2 = special ? mightThrow : function() {
                        try {
                          mightThrow();
                        } catch (e) {
                          if (jQuery.Deferred.exceptionHook) {
                            jQuery.Deferred.exceptionHook(
                              e,
                              process2.error
                            );
                          }
                          if (depth + 1 >= maxDepth) {
                            if (handler !== Thrower) {
                              that = void 0;
                              args = [e];
                            }
                            deferred2.rejectWith(that, args);
                          }
                        }
                      };
                      if (depth) {
                        process2();
                      } else {
                        if (jQuery.Deferred.getErrorHook) {
                          process2.error = jQuery.Deferred.getErrorHook();
                        } else if (jQuery.Deferred.getStackHook) {
                          process2.error = jQuery.Deferred.getStackHook();
                        }
                        window2.setTimeout(process2);
                      }
                    };
                  }
                  return jQuery.Deferred(function(newDefer) {
                    tuples[0][3].add(
                      resolve(
                        0,
                        newDefer,
                        isFunction2(onProgress) ? onProgress : Identity,
                        newDefer.notifyWith
                      )
                    );
                    tuples[1][3].add(
                      resolve(
                        0,
                        newDefer,
                        isFunction2(onFulfilled) ? onFulfilled : Identity
                      )
                    );
                    tuples[2][3].add(
                      resolve(
                        0,
                        newDefer,
                        isFunction2(onRejected) ? onRejected : Thrower
                      )
                    );
                  }).promise();
                },
                // Get a promise for this deferred
                // If obj is provided, the promise aspect is added to the object
                promise: function(obj) {
                  return obj != null ? jQuery.extend(obj, promise) : promise;
                }
              }, deferred = {};
              jQuery.each(tuples, function(i, tuple) {
                var list = tuple[2], stateString = tuple[5];
                promise[tuple[1]] = list.add;
                if (stateString) {
                  list.add(
                    function() {
                      state = stateString;
                    },
                    // rejected_callbacks.disable
                    // fulfilled_callbacks.disable
                    tuples[3 - i][2].disable,
                    // rejected_handlers.disable
                    // fulfilled_handlers.disable
                    tuples[3 - i][3].disable,
                    // progress_callbacks.lock
                    tuples[0][2].lock,
                    // progress_handlers.lock
                    tuples[0][3].lock
                  );
                }
                list.add(tuple[3].fire);
                deferred[tuple[0]] = function() {
                  deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments);
                  return this;
                };
                deferred[tuple[0] + "With"] = list.fireWith;
              });
              promise.promise(deferred);
              if (func) {
                func.call(deferred, deferred);
              }
              return deferred;
            },
            // Deferred helper
            when: function(singleValue) {
              var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery.Deferred(), updateFunc = function(i2) {
                return function(value) {
                  resolveContexts[i2] = this;
                  resolveValues[i2] = arguments.length > 1 ? slice.call(arguments) : value;
                  if (!--remaining) {
                    primary.resolveWith(resolveContexts, resolveValues);
                  }
                };
              };
              if (remaining <= 1) {
                adoptValue(
                  singleValue,
                  primary.done(updateFunc(i)).resolve,
                  primary.reject,
                  !remaining
                );
                if (primary.state() === "pending" || isFunction2(resolveValues[i] && resolveValues[i].then)) {
                  return primary.then();
                }
              }
              while (i--) {
                adoptValue(resolveValues[i], updateFunc(i), primary.reject);
              }
              return primary.promise();
            }
          });
          var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
          jQuery.Deferred.exceptionHook = function(error, asyncError) {
            if (window2.console && window2.console.warn && error && rerrorNames.test(error.name)) {
              window2.console.warn(
                "jQuery.Deferred exception: " + error.message,
                error.stack,
                asyncError
              );
            }
          };
          jQuery.readyException = function(error) {
            window2.setTimeout(function() {
              throw error;
            });
          };
          var readyList = jQuery.Deferred();
          jQuery.fn.ready = function(fn) {
            readyList.then(fn).catch(function(error) {
              jQuery.readyException(error);
            });
            return this;
          };
          jQuery.extend({
            // Is the DOM ready to be used? Set to true once it occurs.
            isReady: false,
            // A counter to track how many items to wait for before
            // the ready event fires. See trac-6781
            readyWait: 1,
            // Handle when the DOM is ready
            ready: function(wait) {
              if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
                return;
              }
              jQuery.isReady = true;
              if (wait !== true && --jQuery.readyWait > 0) {
                return;
              }
              readyList.resolveWith(document2, [jQuery]);
            }
          });
          jQuery.ready.then = readyList.then;
          function completed() {
            document2.removeEventListener("DOMContentLoaded", completed);
            window2.removeEventListener("load", completed);
            jQuery.ready();
          }
          if (document2.readyState === "complete" || document2.readyState !== "loading" && !document2.documentElement.doScroll) {
            window2.setTimeout(jQuery.ready);
          } else {
            document2.addEventListener("DOMContentLoaded", completed);
            window2.addEventListener("load", completed);
          }
          var access = function(elems, fn, key, value, chainable, emptyGet, raw) {
            var i = 0, len = elems.length, bulk = key == null;
            if (toType(key) === "object") {
              chainable = true;
              for (i in key) {
                access(elems, fn, i, key[i], true, emptyGet, raw);
              }
            } else if (value !== void 0) {
              chainable = true;
              if (!isFunction2(value)) {
                raw = true;
              }
              if (bulk) {
                if (raw) {
                  fn.call(elems, value);
                  fn = null;
                } else {
                  bulk = fn;
                  fn = function(elem, _key, value2) {
                    return bulk.call(jQuery(elem), value2);
                  };
                }
              }
              if (fn) {
                for (; i < len; i++) {
                  fn(
                    elems[i],
                    key,
                    raw ? value : value.call(elems[i], i, fn(elems[i], key))
                  );
                }
              }
            }
            if (chainable) {
              return elems;
            }
            if (bulk) {
              return fn.call(elems);
            }
            return len ? fn(elems[0], key) : emptyGet;
          };
          var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g;
          function fcamelCase(_all, letter) {
            return letter.toUpperCase();
          }
          function camelCase(string) {
            return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
          }
          var acceptData = function(owner) {
            return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;
          };
          function Data() {
            this.expando = jQuery.expando + Data.uid++;
          }
          Data.uid = 1;
          Data.prototype = {
            cache: function(owner) {
              var value = owner[this.expando];
              if (!value) {
                value = {};
                if (acceptData(owner)) {
                  if (owner.nodeType) {
                    owner[this.expando] = value;
                  } else {
                    Object.defineProperty(owner, this.expando, {
                      value,
                      configurable: true
                    });
                  }
                }
              }
              return value;
            },
            set: function(owner, data, value) {
              var prop, cache2 = this.cache(owner);
              if (typeof data === "string") {
                cache2[camelCase(data)] = value;
              } else {
                for (prop in data) {
                  cache2[camelCase(prop)] = data[prop];
                }
              }
              return cache2;
            },
            get: function(owner, key) {
              return key === void 0 ? this.cache(owner) : (
                // Always use camelCase key (gh-2257)
                owner[this.expando] && owner[this.expando][camelCase(key)]
              );
            },
            access: function(owner, key, value) {
              if (key === void 0 || key && typeof key === "string" && value === void 0) {
                return this.get(owner, key);
              }
              this.set(owner, key, value);
              return value !== void 0 ? value : key;
            },
            remove: function(owner, key) {
              var i, cache2 = owner[this.expando];
              if (cache2 === void 0) {
                return;
              }
              if (key !== void 0) {
                if (Array.isArray(key)) {
                  key = key.map(camelCase);
                } else {
                  key = camelCase(key);
                  key = key in cache2 ? [key] : key.match(rnothtmlwhite) || [];
                }
                i = key.length;
                while (i--) {
                  delete cache2[key[i]];
                }
              }
              if (key === void 0 || jQuery.isEmptyObject(cache2)) {
                if (owner.nodeType) {
                  owner[this.expando] = void 0;
                } else {
                  delete owner[this.expando];
                }
              }
            },
            hasData: function(owner) {
              var cache2 = owner[this.expando];
              return cache2 !== void 0 && !jQuery.isEmptyObject(cache2);
            }
          };
          var dataPriv = new Data();
          var dataUser = new Data();
          var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g;
          function getData(data) {
            if (data === "true") {
              return true;
            }
            if (data === "false") {
              return false;
            }
            if (data === "null") {
              return null;
            }
            if (data === +data + "") {
              return +data;
            }
            if (rbrace.test(data)) {
              return JSON.parse(data);
            }
            return data;
          }
          function dataAttr(elem, key, data) {
            var name;
            if (data === void 0 && elem.nodeType === 1) {
              name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase();
              data = elem.getAttribute(name);
              if (typeof data === "string") {
                try {
                  data = getData(data);
                } catch (e) {
                }
                dataUser.set(elem, key, data);
              } else {
                data = void 0;
              }
            }
            return data;
          }
          jQuery.extend({
            hasData: function(elem) {
              return dataUser.hasData(elem) || dataPriv.hasData(elem);
            },
            data: function(elem, name, data) {
              return dataUser.access(elem, name, data);
            },
            removeData: function(elem, name) {
              dataUser.remove(elem, name);
            },
            // TODO: Now that all calls to _data and _removeData have been replaced
            // with direct calls to dataPriv methods, these can be deprecated.
            _data: function(elem, name, data) {
              return dataPriv.access(elem, name, data);
            },
            _removeData: function(elem, name) {
              dataPriv.remove(elem, name);
            }
          });
          jQuery.fn.extend({
            data: function(key, value) {
              var i, name, data, elem = this[0], attrs = elem && elem.attributes;
              if (key === void 0) {
                if (this.length) {
                  data = dataUser.get(elem);
                  if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {
                    i = attrs.length;
                    while (i--) {
                      if (attrs[i]) {
                        name = attrs[i].name;
                        if (name.indexOf("data-") === 0) {
                          name = camelCase(name.slice(5));
                          dataAttr(elem, name, data[name]);
                        }
                      }
                    }
                    dataPriv.set(elem, "hasDataAttrs", true);
                  }
                }
                return data;
              }
              if (typeof key === "object") {
                return this.each(function() {
                  dataUser.set(this, key);
                });
              }
              return access(this, function(value2) {
                var data2;
                if (elem && value2 === void 0) {
                  data2 = dataUser.get(elem, key);
                  if (data2 !== void 0) {
                    return data2;
                  }
                  data2 = dataAttr(elem, key);
                  if (data2 !== void 0) {
                    return data2;
                  }
                  return;
                }
                this.each(function() {
                  dataUser.set(this, key, value2);
                });
              }, null, value, arguments.length > 1, null, true);
            },
            removeData: function(key) {
              return this.each(function() {
                dataUser.remove(this, key);
              });
            }
          });
          jQuery.extend({
            queue: function(elem, type, data) {
              var queue;
              if (elem) {
                type = (type || "fx") + "queue";
                queue = dataPriv.get(elem, type);
                if (data) {
                  if (!queue || Array.isArray(data)) {
                    queue = dataPriv.access(elem, type, jQuery.makeArray(data));
                  } else {
                    queue.push(data);
                  }
                }
                return queue || [];
              }
            },
            dequeue: function(elem, type) {
              type = type || "fx";
              var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() {
                jQuery.dequeue(elem, type);
              };
              if (fn === "inprogress") {
                fn = queue.shift();
                startLength--;
              }
              if (fn) {
                if (type === "fx") {
                  queue.unshift("inprogress");
                }
                delete hooks.stop;
                fn.call(elem, next, hooks);
              }
              if (!startLength && hooks) {
                hooks.empty.fire();
              }
            },
            // Not public - generate a queueHooks object, or return the current one
            _queueHooks: function(elem, type) {
              var key = type + "queueHooks";
              return dataPriv.get(elem, key) || dataPriv.access(elem, key, {
                empty: jQuery.Callbacks("once memory").add(function() {
                  dataPriv.remove(elem, [type + "queue", key]);
                })
              });
            }
          });
          jQuery.fn.extend({
            queue: function(type, data) {
              var setter = 2;
              if (typeof type !== "string") {
                data = type;
                type = "fx";
                setter--;
              }
              if (arguments.length < setter) {
                return jQuery.queue(this[0], type);
              }
              return data === void 0 ? this : this.each(function() {
                var queue = jQuery.queue(this, type, data);
                jQuery._queueHooks(this, type);
                if (type === "fx" && queue[0] !== "inprogress") {
                  jQuery.dequeue(this, type);
                }
              });
            },
            dequeue: function(type) {
              return this.each(function() {
                jQuery.dequeue(this, type);
              });
            },
            clearQueue: function(type) {
              return this.queue(type || "fx", []);
            },
            // Get a promise resolved when queues of a certain type
            // are emptied (fx is the type by default)
            promise: function(type, obj) {
              var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() {
                if (!--count) {
                  defer.resolveWith(elements, [elements]);
                }
              };
              if (typeof type !== "string") {
                obj = type;
                type = void 0;
              }
              type = type || "fx";
              while (i--) {
                tmp = dataPriv.get(elements[i], type + "queueHooks");
                if (tmp && tmp.empty) {
                  count++;
                  tmp.empty.add(resolve);
                }
              }
              resolve();
              return defer.promise(obj);
            }
          });
          var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
          var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");
          var cssExpand = ["Top", "Right", "Bottom", "Left"];
          var documentElement = document2.documentElement;
          var isAttached = function(elem) {
            return jQuery.contains(elem.ownerDocument, elem);
          }, composed = { composed: true };
          if (documentElement.getRootNode) {
            isAttached = function(elem) {
              return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;
            };
          }
          var isHiddenWithinTree = function(elem, el) {
            elem = el || elem;
            return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style
            // Support: Firefox <=43 - 45
            // Disconnected elements can have computed display: none, so first confirm that elem is
            // in the document.
            isAttached(elem) && jQuery.css(elem, "display") === "none";
          };
          function adjustCSS(elem, prop, valueParts, tween) {
            var adjusted, scale, maxIterations = 20, currentValue = tween ? function() {
              return tween.cur();
            } : function() {
              return jQuery.css(elem, prop, "");
            }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop));
            if (initialInUnit && initialInUnit[3] !== unit) {
              initial = initial / 2;
              unit = unit || initialInUnit[3];
              initialInUnit = +initial || 1;
              while (maxIterations--) {
                jQuery.style(elem, prop, initialInUnit + unit);
                if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {
                  maxIterations = 0;
                }
                initialInUnit = initialInUnit / scale;
              }
              initialInUnit = initialInUnit * 2;
              jQuery.style(elem, prop, initialInUnit + unit);
              valueParts = valueParts || [];
            }
            if (valueParts) {
              initialInUnit = +initialInUnit || +initial || 0;
              adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];
              if (tween) {
                tween.unit = unit;
                tween.start = initialInUnit;
                tween.end = adjusted;
              }
            }
            return adjusted;
          }
          var defaultDisplayMap = {};
          function getDefaultDisplay(elem) {
            var temp, doc = elem.ownerDocument, nodeName2 = elem.nodeName, display = defaultDisplayMap[nodeName2];
            if (display) {
              return display;
            }
            temp = doc.body.appendChild(doc.createElement(nodeName2));
            display = jQuery.css(temp, "display");
            temp.parentNode.removeChild(temp);
            if (display === "none") {
              display = "block";
            }
            defaultDisplayMap[nodeName2] = display;
            return display;
          }
          function showHide(elements, show) {
            var display, elem, values = [], index = 0, length = elements.length;
            for (; index < length; index++) {
              elem = elements[index];
              if (!elem.style) {
                continue;
              }
              display = elem.style.display;
              if (show) {
                if (display === "none") {
                  values[index] = dataPriv.get(elem, "display") || null;
                  if (!values[index]) {
                    elem.style.display = "";
                  }
                }
                if (elem.style.display === "" && isHiddenWithinTree(elem)) {
                  values[index] = getDefaultDisplay(elem);
                }
              } else {
                if (display !== "none") {
                  values[index] = "none";
                  dataPriv.set(elem, "display", display);
                }
              }
            }
            for (index = 0; index < length; index++) {
              if (values[index] != null) {
                elements[index].style.display = values[index];
              }
            }
            return elements;
          }
          jQuery.fn.extend({
            show: function() {
              return showHide(this, true);
            },
            hide: function() {
              return showHide(this);
            },
            toggle: function(state) {
              if (typeof state === "boolean") {
                return state ? this.show() : this.hide();
              }
              return this.each(function() {
                if (isHiddenWithinTree(this)) {
                  jQuery(this).show();
                } else {
                  jQuery(this).hide();
                }
              });
            }
          });
          var rcheckableType = /^(?:checkbox|radio)$/i;
          var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
          var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;
          (function() {
            var fragment = document2.createDocumentFragment(), div = fragment.appendChild(document2.createElement("div")), input = document2.createElement("input");
            input.setAttribute("type", "radio");
            input.setAttribute("checked", "checked");
            input.setAttribute("name", "t");
            div.appendChild(input);
            support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
            div.innerHTML = "<textarea>x</textarea>";
            support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
            div.innerHTML = "<option></option>";
            support.option = !!div.lastChild;
          })();
          var wrapMap = {
            // XHTML parsers do not magically insert elements in the
            // same way that tag soup parsers do. So we cannot shorten
            // this by omitting <tbody> or other required elements.
            thead: [1, "<table>", "</table>"],
            col: [2, "<table><colgroup>", "</colgroup></table>"],
            tr: [2, "<table><tbody>", "</tbody></table>"],
            td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
            _default: [0, "", ""]
          };
          wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
          wrapMap.th = wrapMap.td;
          if (!support.option) {
            wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"];
          }
          function getAll(context, tag) {
            var ret;
            if (typeof context.getElementsByTagName !== "undefined") {
              ret = context.getElementsByTagName(tag || "*");
            } else if (typeof context.querySelectorAll !== "undefined") {
              ret = context.querySelectorAll(tag || "*");
            } else {
              ret = [];
            }
            if (tag === void 0 || tag && nodeName(context, tag)) {
              return jQuery.merge([context], ret);
            }
            return ret;
          }
          function setGlobalEval(elems, refElements) {
            var i = 0, l = elems.length;
            for (; i < l; i++) {
              dataPriv.set(
                elems[i],
                "globalEval",
                !refElements || dataPriv.get(refElements[i], "globalEval")
              );
            }
          }
          var rhtml = /<|&#?\w+;/;
          function buildFragment(elems, context, scripts, selection, ignored) {
            var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length;
            for (; i < l; i++) {
              elem = elems[i];
              if (elem || elem === 0) {
                if (toType(elem) === "object") {
                  jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
                } else if (!rhtml.test(elem)) {
                  nodes.push(context.createTextNode(elem));
                } else {
                  tmp = tmp || fragment.appendChild(context.createElement("div"));
                  tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
                  wrap = wrapMap[tag] || wrapMap._default;
                  tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
                  j = wrap[0];
                  while (j--) {
                    tmp = tmp.lastChild;
                  }
                  jQuery.merge(nodes, tmp.childNodes);
                  tmp = fragment.firstChild;
                  tmp.textContent = "";
                }
              }
            }
            fragment.textContent = "";
            i = 0;
            while (elem = nodes[i++]) {
              if (selection && jQuery.inArray(elem, selection) > -1) {
                if (ignored) {
                  ignored.push(elem);
                }
                continue;
              }
              attached = isAttached(elem);
              tmp = getAll(fragment.appendChild(elem), "script");
              if (attached) {
                setGlobalEval(tmp);
              }
              if (scripts) {
                j = 0;
                while (elem = tmp[j++]) {
                  if (rscriptType.test(elem.type || "")) {
                    scripts.push(elem);
                  }
                }
              }
            }
            return fragment;
          }
          var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
          function returnTrue() {
            return true;
          }
          function returnFalse() {
            return false;
          }
          function on2(elem, types, selector, data, fn, one) {
            var origFn, type;
            if (typeof types === "object") {
              if (typeof selector !== "string") {
                data = data || selector;
                selector = void 0;
              }
              for (type in types) {
                on2(elem, type, selector, data, types[type], one);
              }
              return elem;
            }
            if (data == null && fn == null) {
              fn = selector;
              data = selector = void 0;
            } else if (fn == null) {
              if (typeof selector === "string") {
                fn = data;
                data = void 0;
              } else {
                fn = data;
                data = selector;
                selector = void 0;
              }
            }
            if (fn === false) {
              fn = returnFalse;
            } else if (!fn) {
              return elem;
            }
            if (one === 1) {
              origFn = fn;
              fn = function(event) {
                jQuery().off(event);
                return origFn.apply(this, arguments);
              };
              fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
            }
            return elem.each(function() {
              jQuery.event.add(this, types, fn, data, selector);
            });
          }
          jQuery.event = {
            global: {},
            add: function(elem, types, handler, data, selector) {
              var handleObjIn, eventHandle, tmp, events2, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem);
              if (!acceptData(elem)) {
                return;
              }
              if (handler.handler) {
                handleObjIn = handler;
                handler = handleObjIn.handler;
                selector = handleObjIn.selector;
              }
              if (selector) {
                jQuery.find.matchesSelector(documentElement, selector);
              }
              if (!handler.guid) {
                handler.guid = jQuery.guid++;
              }
              if (!(events2 = elemData.events)) {
                events2 = elemData.events = /* @__PURE__ */ Object.create(null);
              }
              if (!(eventHandle = elemData.handle)) {
                eventHandle = elemData.handle = function(e) {
                  return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0;
                };
              }
              types = (types || "").match(rnothtmlwhite) || [""];
              t = types.length;
              while (t--) {
                tmp = rtypenamespace.exec(types[t]) || [];
                type = origType = tmp[1];
                namespaces = (tmp[2] || "").split(".").sort();
                if (!type) {
                  continue;
                }
                special = jQuery.event.special[type] || {};
                type = (selector ? special.delegateType : special.bindType) || type;
                special = jQuery.event.special[type] || {};
                handleObj = jQuery.extend({
                  type,
                  origType,
                  data,
                  handler,
                  guid: handler.guid,
                  selector,
                  needsContext: selector && jQuery.expr.match.needsContext.test(selector),
                  namespace: namespaces.join(".")
                }, handleObjIn);
                if (!(handlers = events2[type])) {
                  handlers = events2[type] = [];
                  handlers.delegateCount = 0;
                  if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
                    if (elem.addEventListener) {
                      elem.addEventListener(type, eventHandle);
                    }
                  }
                }
                if (special.add) {
                  special.add.call(elem, handleObj);
                  if (!handleObj.handler.guid) {
                    handleObj.handler.guid = handler.guid;
                  }
                }
                if (selector) {
                  handlers.splice(handlers.delegateCount++, 0, handleObj);
                } else {
                  handlers.push(handleObj);
                }
                jQuery.event.global[type] = true;
              }
            },
            // Detach an event or set of events from an element
            remove: function(elem, types, handler, selector, mappedTypes) {
              var j, origCount, tmp, events2, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
              if (!elemData || !(events2 = elemData.events)) {
                return;
              }
              types = (types || "").match(rnothtmlwhite) || [""];
              t = types.length;
              while (t--) {
                tmp = rtypenamespace.exec(types[t]) || [];
                type = origType = tmp[1];
                namespaces = (tmp[2] || "").split(".").sort();
                if (!type) {
                  for (type in events2) {
                    jQuery.event.remove(elem, type + types[t], handler, selector, true);
                  }
                  continue;
                }
                special = jQuery.event.special[type] || {};
                type = (selector ? special.delegateType : special.bindType) || type;
                handlers = events2[type] || [];
                tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
                origCount = j = handlers.length;
                while (j--) {
                  handleObj = handlers[j];
                  if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
                    handlers.splice(j, 1);
                    if (handleObj.selector) {
                      handlers.delegateCount--;
                    }
                    if (special.remove) {
                      special.remove.call(elem, handleObj);
                    }
                  }
                }
                if (origCount && !handlers.length) {
                  if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
                    jQuery.removeEvent(elem, type, elemData.handle);
                  }
                  delete events2[type];
                }
              }
              if (jQuery.isEmptyObject(events2)) {
                dataPriv.remove(elem, "handle events");
              }
            },
            dispatch: function(nativeEvent) {
              var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event.type] || [], special = jQuery.event.special[event.type] || {};
              args[0] = event;
              for (i = 1; i < arguments.length; i++) {
                args[i] = arguments[i];
              }
              event.delegateTarget = this;
              if (special.preDispatch && special.preDispatch.call(this, event) === false) {
                return;
              }
              handlerQueue = jQuery.event.handlers.call(this, event, handlers);
              i = 0;
              while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
                event.currentTarget = matched.elem;
                j = 0;
                while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
                  if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {
                    event.handleObj = handleObj;
                    event.data = handleObj.data;
                    ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
                    if (ret !== void 0) {
                      if ((event.result = ret) === false) {
                        event.preventDefault();
                        event.stopPropagation();
                      }
                    }
                  }
                }
              }
              if (special.postDispatch) {
                special.postDispatch.call(this, event);
              }
              return event.result;
            },
            handlers: function(event, handlers) {
              var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target;
              if (delegateCount && // Support: IE <=9
              // Black-hole SVG <use> instance trees (trac-13180)
              cur.nodeType && // Support: Firefox <=42
              // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
              // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
              // Support: IE 11 only
              // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
              !(event.type === "click" && event.button >= 1)) {
                for (; cur !== this; cur = cur.parentNode || this) {
                  if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {
                    matchedHandlers = [];
                    matchedSelectors = {};
                    for (i = 0; i < delegateCount; i++) {
                      handleObj = handlers[i];
                      sel = handleObj.selector + " ";
                      if (matchedSelectors[sel] === void 0) {
                        matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;
                      }
                      if (matchedSelectors[sel]) {
                        matchedHandlers.push(handleObj);
                      }
                    }
                    if (matchedHandlers.length) {
                      handlerQueue.push({ elem: cur, handlers: matchedHandlers });
                    }
                  }
                }
              }
              cur = this;
              if (delegateCount < handlers.length) {
                handlerQueue.push({ elem: cur, handlers: handlers.slice(delegateCount) });
              }
              return handlerQueue;
            },
            addProp: function(name, hook) {
              Object.defineProperty(jQuery.Event.prototype, name, {
                enumerable: true,
                configurable: true,
                get: isFunction2(hook) ? function() {
                  if (this.originalEvent) {
                    return hook(this.originalEvent);
                  }
                } : function() {
                  if (this.originalEvent) {
                    return this.originalEvent[name];
                  }
                },
                set: function(value) {
                  Object.defineProperty(this, name, {
                    enumerable: true,
                    configurable: true,
                    writable: true,
                    value
                  });
                }
              });
            },
            fix: function(originalEvent) {
              return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);
            },
            special: {
              load: {
                // Prevent triggered image.load events from bubbling to window.load
                noBubble: true
              },
              click: {
                // Utilize native event to ensure correct state for checkable inputs
                setup: function(data) {
                  var el = this || data;
                  if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
                    leverageNative(el, "click", true);
                  }
                  return false;
                },
                trigger: function(data) {
                  var el = this || data;
                  if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
                    leverageNative(el, "click");
                  }
                  return true;
                },
                // For cross-browser consistency, suppress native .click() on links
                // Also prevent it if we're currently inside a leveraged native-event stack
                _default: function(event) {
                  var target = event.target;
                  return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a");
                }
              },
              beforeunload: {
                postDispatch: function(event) {
                  if (event.result !== void 0 && event.originalEvent) {
                    event.originalEvent.returnValue = event.result;
                  }
                }
              }
            }
          };
          function leverageNative(el, type, isSetup) {
            if (!isSetup) {
              if (dataPriv.get(el, type) === void 0) {
                jQuery.event.add(el, type, returnTrue);
              }
              return;
            }
            dataPriv.set(el, type, false);
            jQuery.event.add(el, type, {
              namespace: false,
              handler: function(event) {
                var result, saved = dataPriv.get(this, type);
                if (event.isTrigger & 1 && this[type]) {
                  if (!saved) {
                    saved = slice.call(arguments);
                    dataPriv.set(this, type, saved);
                    this[type]();
                    result = dataPriv.get(this, type);
                    dataPriv.set(this, type, false);
                    if (saved !== result) {
                      event.stopImmediatePropagation();
                      event.preventDefault();
                      return result;
                    }
                  } else if ((jQuery.event.special[type] || {}).delegateType) {
                    event.stopPropagation();
                  }
                } else if (saved) {
                  dataPriv.set(this, type, jQuery.event.trigger(
                    saved[0],
                    saved.slice(1),
                    this
                  ));
                  event.stopPropagation();
                  event.isImmediatePropagationStopped = returnTrue;
                }
              }
            });
          }
          jQuery.removeEvent = function(elem, type, handle) {
            if (elem.removeEventListener) {
              elem.removeEventListener(type, handle);
            }
          };
          jQuery.Event = function(src, props) {
            if (!(this instanceof jQuery.Event)) {
              return new jQuery.Event(src, props);
            }
            if (src && src.type) {
              this.originalEvent = src;
              this.type = src.type;
              this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === void 0 && // Support: Android <=2.3 only
              src.returnValue === false ? returnTrue : returnFalse;
              this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;
              this.currentTarget = src.currentTarget;
              this.relatedTarget = src.relatedTarget;
            } else {
              this.type = src;
            }
            if (props) {
              jQuery.extend(this, props);
            }
            this.timeStamp = src && src.timeStamp || Date.now();
            this[jQuery.expando] = true;
          };
          jQuery.Event.prototype = {
            constructor: jQuery.Event,
            isDefaultPrevented: returnFalse,
            isPropagationStopped: returnFalse,
            isImmediatePropagationStopped: returnFalse,
            isSimulated: false,
            preventDefault: function() {
              var e = this.originalEvent;
              this.isDefaultPrevented = returnTrue;
              if (e && !this.isSimulated) {
                e.preventDefault();
              }
            },
            stopPropagation: function() {
              var e = this.originalEvent;
              this.isPropagationStopped = returnTrue;
              if (e && !this.isSimulated) {
                e.stopPropagation();
              }
            },
            stopImmediatePropagation: function() {
              var e = this.originalEvent;
              this.isImmediatePropagationStopped = returnTrue;
              if (e && !this.isSimulated) {
                e.stopImmediatePropagation();
              }
              this.stopPropagation();
            }
          };
          jQuery.each({
            altKey: true,
            bubbles: true,
            cancelable: true,
            changedTouches: true,
            ctrlKey: true,
            detail: true,
            eventPhase: true,
            metaKey: true,
            pageX: true,
            pageY: true,
            shiftKey: true,
            view: true,
            "char": true,
            code: true,
            charCode: true,
            key: true,
            keyCode: true,
            button: true,
            buttons: true,
            clientX: true,
            clientY: true,
            offsetX: true,
            offsetY: true,
            pointerId: true,
            pointerType: true,
            screenX: true,
            screenY: true,
            targetTouches: true,
            toElement: true,
            touches: true,
            which: true
          }, jQuery.event.addProp);
          jQuery.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) {
            function focusMappedHandler(nativeEvent) {
              if (document2.documentMode) {
                var handle = dataPriv.get(this, "handle"), event = jQuery.event.fix(nativeEvent);
                event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
                event.isSimulated = true;
                handle(nativeEvent);
                if (event.target === event.currentTarget) {
                  handle(event);
                }
              } else {
                jQuery.event.simulate(
                  delegateType,
                  nativeEvent.target,
                  jQuery.event.fix(nativeEvent)
                );
              }
            }
            jQuery.event.special[type] = {
              // Utilize native event if possible so blur/focus sequence is correct
              setup: function() {
                var attaches;
                leverageNative(this, type, true);
                if (document2.documentMode) {
                  attaches = dataPriv.get(this, delegateType);
                  if (!attaches) {
                    this.addEventListener(delegateType, focusMappedHandler);
                  }
                  dataPriv.set(this, delegateType, (attaches || 0) + 1);
                } else {
                  return false;
                }
              },
              trigger: function() {
                leverageNative(this, type);
                return true;
              },
              teardown: function() {
                var attaches;
                if (document2.documentMode) {
                  attaches = dataPriv.get(this, delegateType) - 1;
                  if (!attaches) {
                    this.removeEventListener(delegateType, focusMappedHandler);
                    dataPriv.remove(this, delegateType);
                  } else {
                    dataPriv.set(this, delegateType, attaches);
                  }
                } else {
                  return false;
                }
              },
              // Suppress native focus or blur if we're currently inside
              // a leveraged native-event stack
              _default: function(event) {
                return dataPriv.get(event.target, type);
              },
              delegateType
            };
            jQuery.event.special[delegateType] = {
              setup: function() {
                var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType);
                if (!attaches) {
                  if (document2.documentMode) {
                    this.addEventListener(delegateType, focusMappedHandler);
                  } else {
                    doc.addEventListener(type, focusMappedHandler, true);
                  }
                }
                dataPriv.set(dataHolder, delegateType, (attaches || 0) + 1);
              },
              teardown: function() {
                var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType) - 1;
                if (!attaches) {
                  if (document2.documentMode) {
                    this.removeEventListener(delegateType, focusMappedHandler);
                  } else {
                    doc.removeEventListener(type, focusMappedHandler, true);
                  }
                  dataPriv.remove(dataHolder, delegateType);
                } else {
                  dataPriv.set(dataHolder, delegateType, attaches);
                }
              }
            };
          });
          jQuery.each({
            mouseenter: "mouseover",
            mouseleave: "mouseout",
            pointerenter: "pointerover",
            pointerleave: "pointerout"
          }, function(orig, fix) {
            jQuery.event.special[orig] = {
              delegateType: fix,
              bindType: fix,
              handle: function(event) {
                var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj;
                if (!related || related !== target && !jQuery.contains(target, related)) {
                  event.type = handleObj.origType;
                  ret = handleObj.handler.apply(this, arguments);
                  event.type = fix;
                }
                return ret;
              }
            };
          });
          jQuery.fn.extend({
            on: function(types, selector, data, fn) {
              return on2(this, types, selector, data, fn);
            },
            one: function(types, selector, data, fn) {
              return on2(this, types, selector, data, fn, 1);
            },
            off: function(types, selector, fn) {
              var handleObj, type;
              if (types && types.preventDefault && types.handleObj) {
                handleObj = types.handleObj;
                jQuery(types.delegateTarget).off(
                  handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
                  handleObj.selector,
                  handleObj.handler
                );
                return this;
              }
              if (typeof types === "object") {
                for (type in types) {
                  this.off(type, selector, types[type]);
                }
                return this;
              }
              if (selector === false || typeof selector === "function") {
                fn = selector;
                selector = void 0;
              }
              if (fn === false) {
                fn = returnFalse;
              }
              return this.each(function() {
                jQuery.event.remove(this, types, fn, selector);
              });
            }
          });
          var rnoInnerhtml = /<script|<style|<link/i, rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
          function manipulationTarget(elem, content) {
            if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {
              return jQuery(elem).children("tbody")[0] || elem;
            }
            return elem;
          }
          function disableScript(elem) {
            elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
            return elem;
          }
          function restoreScript(elem) {
            if ((elem.type || "").slice(0, 5) === "true/") {
              elem.type = elem.type.slice(5);
            } else {
              elem.removeAttribute("type");
            }
            return elem;
          }
          function cloneCopyEvent(src, dest) {
            var i, l, type, pdataOld, udataOld, udataCur, events2;
            if (dest.nodeType !== 1) {
              return;
            }
            if (dataPriv.hasData(src)) {
              pdataOld = dataPriv.get(src);
              events2 = pdataOld.events;
              if (events2) {
                dataPriv.remove(dest, "handle events");
                for (type in events2) {
                  for (i = 0, l = events2[type].length; i < l; i++) {
                    jQuery.event.add(dest, type, events2[type][i]);
                  }
                }
              }
            }
            if (dataUser.hasData(src)) {
              udataOld = dataUser.access(src);
              udataCur = jQuery.extend({}, udataOld);
              dataUser.set(dest, udataCur);
            }
          }
          function fixInput(src, dest) {
            var nodeName2 = dest.nodeName.toLowerCase();
            if (nodeName2 === "input" && rcheckableType.test(src.type)) {
              dest.checked = src.checked;
            } else if (nodeName2 === "input" || nodeName2 === "textarea") {
              dest.defaultValue = src.defaultValue;
            }
          }
          function domManip(collection, args, callback, ignored) {
            args = flat(args);
            var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[0], valueIsFunction = isFunction2(value);
            if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {
              return collection.each(function(index) {
                var self2 = collection.eq(index);
                if (valueIsFunction) {
                  args[0] = value.call(this, index, self2.html());
                }
                domManip(self2, args, callback, ignored);
              });
            }
            if (l) {
              fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
              first = fragment.firstChild;
              if (fragment.childNodes.length === 1) {
                fragment = first;
              }
              if (first || ignored) {
                scripts = jQuery.map(getAll(fragment, "script"), disableScript);
                hasScripts = scripts.length;
                for (; i < l; i++) {
                  node = fragment;
                  if (i !== iNoClone) {
                    node = jQuery.clone(node, true, true);
                    if (hasScripts) {
                      jQuery.merge(scripts, getAll(node, "script"));
                    }
                  }
                  callback.call(collection[i], node, i);
                }
                if (hasScripts) {
                  doc = scripts[scripts.length - 1].ownerDocument;
                  jQuery.map(scripts, restoreScript);
                  for (i = 0; i < hasScripts; i++) {
                    node = scripts[i];
                    if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) {
                      if (node.src && (node.type || "").toLowerCase() !== "module") {
                        if (jQuery._evalUrl && !node.noModule) {
                          jQuery._evalUrl(node.src, {
                            nonce: node.nonce || node.getAttribute("nonce")
                          }, doc);
                        }
                      } else {
                        DOMEval(node.textContent.replace(rcleanScript, ""), node, doc);
                      }
                    }
                  }
                }
              }
            }
            return collection;
          }
          function remove(elem, selector, keepData) {
            var node, nodes = selector ? jQuery.filter(selector, elem) : elem, i = 0;
            for (; (node = nodes[i]) != null; i++) {
              if (!keepData && node.nodeType === 1) {
                jQuery.cleanData(getAll(node));
              }
              if (node.parentNode) {
                if (keepData && isAttached(node)) {
                  setGlobalEval(getAll(node, "script"));
                }
                node.parentNode.removeChild(node);
              }
            }
            return elem;
          }
          jQuery.extend({
            htmlPrefilter: function(html) {
              return html;
            },
            clone: function(elem, dataAndEvents, deepDataAndEvents) {
              var i, l, srcElements, destElements, clone = elem.cloneNode(true), inPage = isAttached(elem);
              if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
                destElements = getAll(clone);
                srcElements = getAll(elem);
                for (i = 0, l = srcElements.length; i < l; i++) {
                  fixInput(srcElements[i], destElements[i]);
                }
              }
              if (dataAndEvents) {
                if (deepDataAndEvents) {
                  srcElements = srcElements || getAll(elem);
                  destElements = destElements || getAll(clone);
                  for (i = 0, l = srcElements.length; i < l; i++) {
                    cloneCopyEvent(srcElements[i], destElements[i]);
                  }
                } else {
                  cloneCopyEvent(elem, clone);
                }
              }
              destElements = getAll(clone, "script");
              if (destElements.length > 0) {
                setGlobalEval(destElements, !inPage && getAll(elem, "script"));
              }
              return clone;
            },
            cleanData: function(elems) {
              var data, elem, type, special = jQuery.event.special, i = 0;
              for (; (elem = elems[i]) !== void 0; i++) {
                if (acceptData(elem)) {
                  if (data = elem[dataPriv.expando]) {
                    if (data.events) {
                      for (type in data.events) {
                        if (special[type]) {
                          jQuery.event.remove(elem, type);
                        } else {
                          jQuery.removeEvent(elem, type, data.handle);
                        }
                      }
                    }
                    elem[dataPriv.expando] = void 0;
                  }
                  if (elem[dataUser.expando]) {
                    elem[dataUser.expando] = void 0;
                  }
                }
              }
            }
          });
          jQuery.fn.extend({
            detach: function(selector) {
              return remove(this, selector, true);
            },
            remove: function(selector) {
              return remove(this, selector);
            },
            text: function(value) {
              return access(this, function(value2) {
                return value2 === void 0 ? jQuery.text(this) : this.empty().each(function() {
                  if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
                    this.textContent = value2;
                  }
                });
              }, null, value, arguments.length);
            },
            append: function() {
              return domManip(this, arguments, function(elem) {
                if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
                  var target = manipulationTarget(this, elem);
                  target.appendChild(elem);
                }
              });
            },
            prepend: function() {
              return domManip(this, arguments, function(elem) {
                if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
                  var target = manipulationTarget(this, elem);
                  target.insertBefore(elem, target.firstChild);
                }
              });
            },
            before: function() {
              return domManip(this, arguments, function(elem) {
                if (this.parentNode) {
                  this.parentNode.insertBefore(elem, this);
                }
              });
            },
            after: function() {
              return domManip(this, arguments, function(elem) {
                if (this.parentNode) {
                  this.parentNode.insertBefore(elem, this.nextSibling);
                }
              });
            },
            empty: function() {
              var elem, i = 0;
              for (; (elem = this[i]) != null; i++) {
                if (elem.nodeType === 1) {
                  jQuery.cleanData(getAll(elem, false));
                  elem.textContent = "";
                }
              }
              return this;
            },
            clone: function(dataAndEvents, deepDataAndEvents) {
              dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
              deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
              return this.map(function() {
                return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
              });
            },
            html: function(value) {
              return access(this, function(value2) {
                var elem = this[0] || {}, i = 0, l = this.length;
                if (value2 === void 0 && elem.nodeType === 1) {
                  return elem.innerHTML;
                }
                if (typeof value2 === "string" && !rnoInnerhtml.test(value2) && !wrapMap[(rtagName.exec(value2) || ["", ""])[1].toLowerCase()]) {
                  value2 = jQuery.htmlPrefilter(value2);
                  try {
                    for (; i < l; i++) {
                      elem = this[i] || {};
                      if (elem.nodeType === 1) {
                        jQuery.cleanData(getAll(elem, false));
                        elem.innerHTML = value2;
                      }
                    }
                    elem = 0;
                  } catch (e) {
                  }
                }
                if (elem) {
                  this.empty().append(value2);
                }
              }, null, value, arguments.length);
            },
            replaceWith: function() {
              var ignored = [];
              return domManip(this, arguments, function(elem) {
                var parent = this.parentNode;
                if (jQuery.inArray(this, ignored) < 0) {
                  jQuery.cleanData(getAll(this));
                  if (parent) {
                    parent.replaceChild(elem, this);
                  }
                }
              }, ignored);
            }
          });
          jQuery.each({
            appendTo: "append",
            prependTo: "prepend",
            insertBefore: "before",
            insertAfter: "after",
            replaceAll: "replaceWith"
          }, function(name, original) {
            jQuery.fn[name] = function(selector) {
              var elems, ret = [], insert = jQuery(selector), last = insert.length - 1, i = 0;
              for (; i <= last; i++) {
                elems = i === last ? this : this.clone(true);
                jQuery(insert[i])[original](elems);
                push2.apply(ret, elems.get());
              }
              return this.pushStack(ret);
            };
          });
          var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
          var rcustomProp = /^--/;
          var getStyles = function(elem) {
            var view = elem.ownerDocument.defaultView;
            if (!view || !view.opener) {
              view = window2;
            }
            return view.getComputedStyle(elem);
          };
          var swap = function(elem, options, callback) {
            var ret, name, old = {};
            for (name in options) {
              old[name] = elem.style[name];
              elem.style[name] = options[name];
            }
            ret = callback.call(elem);
            for (name in options) {
              elem.style[name] = old[name];
            }
            return ret;
          };
          var rboxStyle = new RegExp(cssExpand.join("|"), "i");
          (function() {
            function computeStyleTests() {
              if (!div) {
                return;
              }
              container.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";
              div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";
              documentElement.appendChild(container).appendChild(div);
              var divStyle = window2.getComputedStyle(div);
              pixelPositionVal = divStyle.top !== "1%";
              reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;
              div.style.right = "60%";
              pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;
              boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;
              div.style.position = "absolute";
              scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;
              documentElement.removeChild(container);
              div = null;
            }
            function roundPixelMeasures(measure) {
              return Math.round(parseFloat(measure));
            }
            var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document2.createElement("div"), div = document2.createElement("div");
            if (!div.style) {
              return;
            }
            div.style.backgroundClip = "content-box";
            div.cloneNode(true).style.backgroundClip = "";
            support.clearCloneStyle = div.style.backgroundClip === "content-box";
            jQuery.extend(support, {
              boxSizingReliable: function() {
                computeStyleTests();
                return boxSizingReliableVal;
              },
              pixelBoxStyles: function() {
                computeStyleTests();
                return pixelBoxStylesVal;
              },
              pixelPosition: function() {
                computeStyleTests();
                return pixelPositionVal;
              },
              reliableMarginLeft: function() {
                computeStyleTests();
                return reliableMarginLeftVal;
              },
              scrollboxSize: function() {
                computeStyleTests();
                return scrollboxSizeVal;
              },
              // Support: IE 9 - 11+, Edge 15 - 18+
              // IE/Edge misreport `getComputedStyle` of table rows with width/height
              // set in CSS while `offset*` properties report correct values.
              // Behavior in IE 9 is more subtle than in newer versions & it passes
              // some versions of this test; make sure not to make it pass there!
              //
              // Support: Firefox 70+
              // Only Firefox includes border widths
              // in computed dimensions. (gh-4529)
              reliableTrDimensions: function() {
                var table, tr, trChild, trStyle;
                if (reliableTrDimensionsVal == null) {
                  table = document2.createElement("table");
                  tr = document2.createElement("tr");
                  trChild = document2.createElement("div");
                  table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
                  tr.style.cssText = "box-sizing:content-box;border:1px solid";
                  tr.style.height = "1px";
                  trChild.style.height = "9px";
                  trChild.style.display = "block";
                  documentElement.appendChild(table).appendChild(tr).appendChild(trChild);
                  trStyle = window2.getComputedStyle(tr);
                  reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight;
                  documentElement.removeChild(table);
                }
                return reliableTrDimensionsVal;
              }
            });
          })();
          function curCSS(elem, name, computed2) {
            var width, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test(name), style2 = elem.style;
            computed2 = computed2 || getStyles(elem);
            if (computed2) {
              ret = computed2.getPropertyValue(name) || computed2[name];
              if (isCustomProp && ret) {
                ret = ret.replace(rtrimCSS, "$1") || void 0;
              }
              if (ret === "" && !isAttached(elem)) {
                ret = jQuery.style(elem, name);
              }
              if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {
                width = style2.width;
                minWidth = style2.minWidth;
                maxWidth = style2.maxWidth;
                style2.minWidth = style2.maxWidth = style2.width = ret;
                ret = computed2.width;
                style2.width = width;
                style2.minWidth = minWidth;
                style2.maxWidth = maxWidth;
              }
            }
            return ret !== void 0 ? (
              // Support: IE <=9 - 11 only
              // IE returns zIndex value as an integer.
              ret + ""
            ) : ret;
          }
          function addGetHookIf(conditionFn, hookFn) {
            return {
              get: function() {
                if (conditionFn()) {
                  delete this.get;
                  return;
                }
                return (this.get = hookFn).apply(this, arguments);
              }
            };
          }
          var cssPrefixes = ["Webkit", "Moz", "ms"], emptyStyle = document2.createElement("div").style, vendorProps = {};
          function vendorPropName(name) {
            var capName = name[0].toUpperCase() + name.slice(1), i = cssPrefixes.length;
            while (i--) {
              name = cssPrefixes[i] + capName;
              if (name in emptyStyle) {
                return name;
              }
            }
          }
          function finalPropName(name) {
            var final = jQuery.cssProps[name] || vendorProps[name];
            if (final) {
              return final;
            }
            if (name in emptyStyle) {
              return name;
            }
            return vendorProps[name] = vendorPropName(name) || name;
          }
          var rdisplayswap = /^(none|table(?!-c[ea]).+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = {
            letterSpacing: "0",
            fontWeight: "400"
          };
          function setPositiveNumber(_elem, value, subtract) {
            var matches = rcssNum.exec(value);
            return matches ? (
              // Guard against undefined "subtract", e.g., when used as in cssHooks
              Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px")
            ) : value;
          }
          function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
            var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0, marginDelta = 0;
            if (box === (isBorderBox ? "border" : "content")) {
              return 0;
            }
            for (; i < 4; i += 2) {
              if (box === "margin") {
                marginDelta += jQuery.css(elem, box + cssExpand[i], true, styles);
              }
              if (!isBorderBox) {
                delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
                if (box !== "padding") {
                  delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
                } else {
                  extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
                }
              } else {
                if (box === "content") {
                  delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
                }
                if (box !== "margin") {
                  delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
                }
              }
            }
            if (!isBorderBox && computedVal >= 0) {
              delta += Math.max(0, Math.ceil(
                elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5
                // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
                // Use an explicit zero to avoid NaN (gh-3964)
              )) || 0;
            }
            return delta + marginDelta;
          }
          function getWidthOrHeight(elem, dimension, extra) {
            var styles = getStyles(elem), boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1);
            if (rnumnonpx.test(val)) {
              if (!extra) {
                return val;
              }
              val = "auto";
            }
            if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+
            // IE/Edge misreport `getComputedStyle` of table rows with width/height
            // set in CSS while `offset*` properties report correct values.
            // Interestingly, in some cases IE 9 doesn't suffer from this issue.
            !support.reliableTrDimensions() && nodeName(elem, "tr") || // Fall back to offsetWidth/offsetHeight when value is "auto"
            // This happens for inline elements with no explicit setting (gh-3571)
            val === "auto" || // Support: Android <=4.1 - 4.3 only
            // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
            !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected
            elem.getClientRects().length) {
              isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box";
              valueIsBorderBox = offsetProp in elem;
              if (valueIsBorderBox) {
                val = elem[offsetProp];
              }
            }
            val = parseFloat(val) || 0;
            return val + boxModelAdjustment(
              elem,
              dimension,
              extra || (isBorderBox ? "border" : "content"),
              valueIsBorderBox,
              styles,
              // Provide the current computed size to request scroll gutter calculation (gh-3589)
              val
            ) + "px";
          }
          jQuery.extend({
            // Add in style property hooks for overriding the default
            // behavior of getting and setting a style property
            cssHooks: {
              opacity: {
                get: function(elem, computed2) {
                  if (computed2) {
                    var ret = curCSS(elem, "opacity");
                    return ret === "" ? "1" : ret;
                  }
                }
              }
            },
            // Don't automatically add "px" to these possibly-unitless properties
            cssNumber: {
              animationIterationCount: true,
              aspectRatio: true,
              borderImageSlice: true,
              columnCount: true,
              flexGrow: true,
              flexShrink: true,
              fontWeight: true,
              gridArea: true,
              gridColumn: true,
              gridColumnEnd: true,
              gridColumnStart: true,
              gridRow: true,
              gridRowEnd: true,
              gridRowStart: true,
              lineHeight: true,
              opacity: true,
              order: true,
              orphans: true,
              scale: true,
              widows: true,
              zIndex: true,
              zoom: true,
              // SVG-related
              fillOpacity: true,
              floodOpacity: true,
              stopOpacity: true,
              strokeMiterlimit: true,
              strokeOpacity: true
            },
            // Add in properties whose names you wish to fix before
            // setting or getting the value
            cssProps: {},
            // Get and set the style property on a DOM Node
            style: function(elem, name, value, extra) {
              if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
                return;
              }
              var ret, type, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name), style2 = elem.style;
              if (!isCustomProp) {
                name = finalPropName(origName);
              }
              hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
              if (value !== void 0) {
                type = typeof value;
                if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {
                  value = adjustCSS(elem, name, ret);
                  type = "number";
                }
                if (value == null || value !== value) {
                  return;
                }
                if (type === "number" && !isCustomProp) {
                  value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px");
                }
                if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
                  style2[name] = "inherit";
                }
                if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== void 0) {
                  if (isCustomProp) {
                    style2.setProperty(name, value);
                  } else {
                    style2[name] = value;
                  }
                }
              } else {
                if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== void 0) {
                  return ret;
                }
                return style2[name];
              }
            },
            css: function(elem, name, extra, styles) {
              var val, num, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name);
              if (!isCustomProp) {
                name = finalPropName(origName);
              }
              hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
              if (hooks && "get" in hooks) {
                val = hooks.get(elem, true, extra);
              }
              if (val === void 0) {
                val = curCSS(elem, name, styles);
              }
              if (val === "normal" && name in cssNormalTransform) {
                val = cssNormalTransform[name];
              }
              if (extra === "" || extra) {
                num = parseFloat(val);
                return extra === true || isFinite(num) ? num || 0 : val;
              }
              return val;
            }
          });
          jQuery.each(["height", "width"], function(_i, dimension) {
            jQuery.cssHooks[dimension] = {
              get: function(elem, computed2, extra) {
                if (computed2) {
                  return rdisplayswap.test(jQuery.css(elem, "display")) && // Support: Safari 8+
                  // Table columns in Safari have non-zero offsetWidth & zero
                  // getBoundingClientRect().width unless display is changed.
                  // Support: IE <=11 only
                  // Running getBoundingClientRect on a disconnected node
                  // in IE throws an error.
                  (!elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function() {
                    return getWidthOrHeight(elem, dimension, extra);
                  }) : getWidthOrHeight(elem, dimension, extra);
                }
              },
              set: function(elem, value, extra) {
                var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment(
                  elem,
                  dimension,
                  extra,
                  isBorderBox,
                  styles
                ) : 0;
                if (isBorderBox && scrollboxSizeBuggy) {
                  subtract -= Math.ceil(
                    elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5
                  );
                }
                if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") {
                  elem.style[dimension] = value;
                  value = jQuery.css(elem, dimension);
                }
                return setPositiveNumber(elem, value, subtract);
              }
            };
          });
          jQuery.cssHooks.marginLeft = addGetHookIf(
            support.reliableMarginLeft,
            function(elem, computed2) {
              if (computed2) {
                return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { marginLeft: 0 }, function() {
                  return elem.getBoundingClientRect().left;
                })) + "px";
              }
            }
          );
          jQuery.each({
            margin: "",
            padding: "",
            border: "Width"
          }, function(prefix2, suffix2) {
            jQuery.cssHooks[prefix2 + suffix2] = {
              expand: function(value) {
                var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value];
                for (; i < 4; i++) {
                  expanded[prefix2 + cssExpand[i] + suffix2] = parts[i] || parts[i - 2] || parts[0];
                }
                return expanded;
              }
            };
            if (prefix2 !== "margin") {
              jQuery.cssHooks[prefix2 + suffix2].set = setPositiveNumber;
            }
          });
          jQuery.fn.extend({
            css: function(name, value) {
              return access(this, function(elem, name2, value2) {
                var styles, len, map = {}, i = 0;
                if (Array.isArray(name2)) {
                  styles = getStyles(elem);
                  len = name2.length;
                  for (; i < len; i++) {
                    map[name2[i]] = jQuery.css(elem, name2[i], false, styles);
                  }
                  return map;
                }
                return value2 !== void 0 ? jQuery.style(elem, name2, value2) : jQuery.css(elem, name2);
              }, name, value, arguments.length > 1);
            }
          });
          function Tween(elem, options, prop, end, easing) {
            return new Tween.prototype.init(elem, options, prop, end, easing);
          }
          jQuery.Tween = Tween;
          Tween.prototype = {
            constructor: Tween,
            init: function(elem, options, prop, end, easing, unit) {
              this.elem = elem;
              this.prop = prop;
              this.easing = easing || jQuery.easing._default;
              this.options = options;
              this.start = this.now = this.cur();
              this.end = end;
              this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
            },
            cur: function() {
              var hooks = Tween.propHooks[this.prop];
              return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
            },
            run: function(percent) {
              var eased, hooks = Tween.propHooks[this.prop];
              if (this.options.duration) {
                this.pos = eased = jQuery.easing[this.easing](
                  percent,
                  this.options.duration * percent,
                  0,
                  1,
                  this.options.duration
                );
              } else {
                this.pos = eased = percent;
              }
              this.now = (this.end - this.start) * eased + this.start;
              if (this.options.step) {
                this.options.step.call(this.elem, this.now, this);
              }
              if (hooks && hooks.set) {
                hooks.set(this);
              } else {
                Tween.propHooks._default.set(this);
              }
              return this;
            }
          };
          Tween.prototype.init.prototype = Tween.prototype;
          Tween.propHooks = {
            _default: {
              get: function(tween) {
                var result;
                if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
                  return tween.elem[tween.prop];
                }
                result = jQuery.css(tween.elem, tween.prop, "");
                return !result || result === "auto" ? 0 : result;
              },
              set: function(tween) {
                if (jQuery.fx.step[tween.prop]) {
                  jQuery.fx.step[tween.prop](tween);
                } else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) {
                  jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
                } else {
                  tween.elem[tween.prop] = tween.now;
                }
              }
            }
          };
          Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
            set: function(tween) {
              if (tween.elem.nodeType && tween.elem.parentNode) {
                tween.elem[tween.prop] = tween.now;
              }
            }
          };
          jQuery.easing = {
            linear: function(p) {
              return p;
            },
            swing: function(p) {
              return 0.5 - Math.cos(p * Math.PI) / 2;
            },
            _default: "swing"
          };
          jQuery.fx = Tween.prototype.init;
          jQuery.fx.step = {};
          var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/;
          function schedule() {
            if (inProgress) {
              if (document2.hidden === false && window2.requestAnimationFrame) {
                window2.requestAnimationFrame(schedule);
              } else {
                window2.setTimeout(schedule, jQuery.fx.interval);
              }
              jQuery.fx.tick();
            }
          }
          function createFxNow() {
            window2.setTimeout(function() {
              fxNow = void 0;
            });
            return fxNow = Date.now();
          }
          function genFx(type, includeWidth) {
            var which, i = 0, attrs = { height: type };
            includeWidth = includeWidth ? 1 : 0;
            for (; i < 4; i += 2 - includeWidth) {
              which = cssExpand[i];
              attrs["margin" + which] = attrs["padding" + which] = type;
            }
            if (includeWidth) {
              attrs.opacity = attrs.width = type;
            }
            return attrs;
          }
          function createTween(value, prop, animation) {
            var tween, collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), index = 0, length = collection.length;
            for (; index < length; index++) {
              if (tween = collection[index].call(animation, prop, value)) {
                return tween;
              }
            }
          }
          function defaultPrefilter(elem, props, opts) {
            var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style2 = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow");
            if (!opts.queue) {
              hooks = jQuery._queueHooks(elem, "fx");
              if (hooks.unqueued == null) {
                hooks.unqueued = 0;
                oldfire = hooks.empty.fire;
                hooks.empty.fire = function() {
                  if (!hooks.unqueued) {
                    oldfire();
                  }
                };
              }
              hooks.unqueued++;
              anim.always(function() {
                anim.always(function() {
                  hooks.unqueued--;
                  if (!jQuery.queue(elem, "fx").length) {
                    hooks.empty.fire();
                  }
                });
              });
            }
            for (prop in props) {
              value = props[prop];
              if (rfxtypes.test(value)) {
                delete props[prop];
                toggle = toggle || value === "toggle";
                if (value === (hidden ? "hide" : "show")) {
                  if (value === "show" && dataShow && dataShow[prop] !== void 0) {
                    hidden = true;
                  } else {
                    continue;
                  }
                }
                orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
              }
            }
            propTween = !jQuery.isEmptyObject(props);
            if (!propTween && jQuery.isEmptyObject(orig)) {
              return;
            }
            if (isBox && elem.nodeType === 1) {
              opts.overflow = [style2.overflow, style2.overflowX, style2.overflowY];
              restoreDisplay = dataShow && dataShow.display;
              if (restoreDisplay == null) {
                restoreDisplay = dataPriv.get(elem, "display");
              }
              display = jQuery.css(elem, "display");
              if (display === "none") {
                if (restoreDisplay) {
                  display = restoreDisplay;
                } else {
                  showHide([elem], true);
                  restoreDisplay = elem.style.display || restoreDisplay;
                  display = jQuery.css(elem, "display");
                  showHide([elem]);
                }
              }
              if (display === "inline" || display === "inline-block" && restoreDisplay != null) {
                if (jQuery.css(elem, "float") === "none") {
                  if (!propTween) {
                    anim.done(function() {
                      style2.display = restoreDisplay;
                    });
                    if (restoreDisplay == null) {
                      display = style2.display;
                      restoreDisplay = display === "none" ? "" : display;
                    }
                  }
                  style2.display = "inline-block";
                }
              }
            }
            if (opts.overflow) {
              style2.overflow = "hidden";
              anim.always(function() {
                style2.overflow = opts.overflow[0];
                style2.overflowX = opts.overflow[1];
                style2.overflowY = opts.overflow[2];
              });
            }
            propTween = false;
            for (prop in orig) {
              if (!propTween) {
                if (dataShow) {
                  if ("hidden" in dataShow) {
                    hidden = dataShow.hidden;
                  }
                } else {
                  dataShow = dataPriv.access(elem, "fxshow", { display: restoreDisplay });
                }
                if (toggle) {
                  dataShow.hidden = !hidden;
                }
                if (hidden) {
                  showHide([elem], true);
                }
                anim.done(function() {
                  if (!hidden) {
                    showHide([elem]);
                  }
                  dataPriv.remove(elem, "fxshow");
                  for (prop in orig) {
                    jQuery.style(elem, prop, orig[prop]);
                  }
                });
              }
              propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
              if (!(prop in dataShow)) {
                dataShow[prop] = propTween.start;
                if (hidden) {
                  propTween.end = propTween.start;
                  propTween.start = 0;
                }
              }
            }
          }
          function propFilter(props, specialEasing) {
            var index, name, easing, value, hooks;
            for (index in props) {
              name = camelCase(index);
              easing = specialEasing[name];
              value = props[index];
              if (Array.isArray(value)) {
                easing = value[1];
                value = props[index] = value[0];
              }
              if (index !== name) {
                props[name] = value;
                delete props[index];
              }
              hooks = jQuery.cssHooks[name];
              if (hooks && "expand" in hooks) {
                value = hooks.expand(value);
                delete props[name];
                for (index in value) {
                  if (!(index in props)) {
                    props[index] = value[index];
                    specialEasing[index] = easing;
                  }
                }
              } else {
                specialEasing[name] = easing;
              }
            }
          }
          function Animation(elem, properties, options) {
            var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always(function() {
              delete tick.elem;
            }), tick = function() {
              if (stopped) {
                return false;
              }
              var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), temp = remaining / animation.duration || 0, percent = 1 - temp, index2 = 0, length2 = animation.tweens.length;
              for (; index2 < length2; index2++) {
                animation.tweens[index2].run(percent);
              }
              deferred.notifyWith(elem, [animation, percent, remaining]);
              if (percent < 1 && length2) {
                return remaining;
              }
              if (!length2) {
                deferred.notifyWith(elem, [animation, 1, 0]);
              }
              deferred.resolveWith(elem, [animation]);
              return false;
            }, animation = deferred.promise({
              elem,
              props: jQuery.extend({}, properties),
              opts: jQuery.extend(true, {
                specialEasing: {},
                easing: jQuery.easing._default
              }, options),
              originalProperties: properties,
              originalOptions: options,
              startTime: fxNow || createFxNow(),
              duration: options.duration,
              tweens: [],
              createTween: function(prop, end) {
                var tween = jQuery.Tween(
                  elem,
                  animation.opts,
                  prop,
                  end,
                  animation.opts.specialEasing[prop] || animation.opts.easing
                );
                animation.tweens.push(tween);
                return tween;
              },
              stop: function(gotoEnd) {
                var index2 = 0, length2 = gotoEnd ? animation.tweens.length : 0;
                if (stopped) {
                  return this;
                }
                stopped = true;
                for (; index2 < length2; index2++) {
                  animation.tweens[index2].run(1);
                }
                if (gotoEnd) {
                  deferred.notifyWith(elem, [animation, 1, 0]);
                  deferred.resolveWith(elem, [animation, gotoEnd]);
                } else {
                  deferred.rejectWith(elem, [animation, gotoEnd]);
                }
                return this;
              }
            }), props = animation.props;
            propFilter(props, animation.opts.specialEasing);
            for (; index < length; index++) {
              result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
              if (result) {
                if (isFunction2(result.stop)) {
                  jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result);
                }
                return result;
              }
            }
            jQuery.map(props, createTween, animation);
            if (isFunction2(animation.opts.start)) {
              animation.opts.start.call(elem, animation);
            }
            animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
            jQuery.fx.timer(
              jQuery.extend(tick, {
                elem,
                anim: animation,
                queue: animation.opts.queue
              })
            );
            return animation;
          }
          jQuery.Animation = jQuery.extend(Animation, {
            tweeners: {
              "*": [function(prop, value) {
                var tween = this.createTween(prop, value);
                adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
                return tween;
              }]
            },
            tweener: function(props, callback) {
              if (isFunction2(props)) {
                callback = props;
                props = ["*"];
              } else {
                props = props.match(rnothtmlwhite);
              }
              var prop, index = 0, length = props.length;
              for (; index < length; index++) {
                prop = props[index];
                Animation.tweeners[prop] = Animation.tweeners[prop] || [];
                Animation.tweeners[prop].unshift(callback);
              }
            },
            prefilters: [defaultPrefilter],
            prefilter: function(callback, prepend) {
              if (prepend) {
                Animation.prefilters.unshift(callback);
              } else {
                Animation.prefilters.push(callback);
              }
            }
          });
          jQuery.speed = function(speed, easing, fn) {
            var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
              complete: fn || !fn && easing || isFunction2(speed) && speed,
              duration: speed,
              easing: fn && easing || easing && !isFunction2(easing) && easing
            };
            if (jQuery.fx.off) {
              opt.duration = 0;
            } else {
              if (typeof opt.duration !== "number") {
                if (opt.duration in jQuery.fx.speeds) {
                  opt.duration = jQuery.fx.speeds[opt.duration];
                } else {
                  opt.duration = jQuery.fx.speeds._default;
                }
              }
            }
            if (opt.queue == null || opt.queue === true) {
              opt.queue = "fx";
            }
            opt.old = opt.complete;
            opt.complete = function() {
              if (isFunction2(opt.old)) {
                opt.old.call(this);
              }
              if (opt.queue) {
                jQuery.dequeue(this, opt.queue);
              }
            };
            return opt;
          };
          jQuery.fn.extend({
            fadeTo: function(speed, to, easing, callback) {
              return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback);
            },
            animate: function(prop, speed, easing, callback) {
              var empty = jQuery.isEmptyObject(prop), optall = jQuery.speed(speed, easing, callback), doAnimation = function() {
                var anim = Animation(this, jQuery.extend({}, prop), optall);
                if (empty || dataPriv.get(this, "finish")) {
                  anim.stop(true);
                }
              };
              doAnimation.finish = doAnimation;
              return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
            },
            stop: function(type, clearQueue, gotoEnd) {
              var stopQueue = function(hooks) {
                var stop = hooks.stop;
                delete hooks.stop;
                stop(gotoEnd);
              };
              if (typeof type !== "string") {
                gotoEnd = clearQueue;
                clearQueue = type;
                type = void 0;
              }
              if (clearQueue) {
                this.queue(type || "fx", []);
              }
              return this.each(function() {
                var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get(this);
                if (index) {
                  if (data[index] && data[index].stop) {
                    stopQueue(data[index]);
                  }
                } else {
                  for (index in data) {
                    if (data[index] && data[index].stop && rrun.test(index)) {
                      stopQueue(data[index]);
                    }
                  }
                }
                for (index = timers.length; index--; ) {
                  if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
                    timers[index].anim.stop(gotoEnd);
                    dequeue = false;
                    timers.splice(index, 1);
                  }
                }
                if (dequeue || !gotoEnd) {
                  jQuery.dequeue(this, type);
                }
              });
            },
            finish: function(type) {
              if (type !== false) {
                type = type || "fx";
              }
              return this.each(function() {
                var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery.timers, length = queue ? queue.length : 0;
                data.finish = true;
                jQuery.queue(this, type, []);
                if (hooks && hooks.stop) {
                  hooks.stop.call(this, true);
                }
                for (index = timers.length; index--; ) {
                  if (timers[index].elem === this && timers[index].queue === type) {
                    timers[index].anim.stop(true);
                    timers.splice(index, 1);
                  }
                }
                for (index = 0; index < length; index++) {
                  if (queue[index] && queue[index].finish) {
                    queue[index].finish.call(this);
                  }
                }
                delete data.finish;
              });
            }
          });
          jQuery.each(["toggle", "show", "hide"], function(_i, name) {
            var cssFn = jQuery.fn[name];
            jQuery.fn[name] = function(speed, easing, callback) {
              return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
            };
          });
          jQuery.each({
            slideDown: genFx("show"),
            slideUp: genFx("hide"),
            slideToggle: genFx("toggle"),
            fadeIn: { opacity: "show" },
            fadeOut: { opacity: "hide" },
            fadeToggle: { opacity: "toggle" }
          }, function(name, props) {
            jQuery.fn[name] = function(speed, easing, callback) {
              return this.animate(props, speed, easing, callback);
            };
          });
          jQuery.timers = [];
          jQuery.fx.tick = function() {
            var timer, i = 0, timers = jQuery.timers;
            fxNow = Date.now();
            for (; i < timers.length; i++) {
              timer = timers[i];
              if (!timer() && timers[i] === timer) {
                timers.splice(i--, 1);
              }
            }
            if (!timers.length) {
              jQuery.fx.stop();
            }
            fxNow = void 0;
          };
          jQuery.fx.timer = function(timer) {
            jQuery.timers.push(timer);
            jQuery.fx.start();
          };
          jQuery.fx.interval = 13;
          jQuery.fx.start = function() {
            if (inProgress) {
              return;
            }
            inProgress = true;
            schedule();
          };
          jQuery.fx.stop = function() {
            inProgress = null;
          };
          jQuery.fx.speeds = {
            slow: 600,
            fast: 200,
            // Default speed
            _default: 400
          };
          jQuery.fn.delay = function(time2, type) {
            time2 = jQuery.fx ? jQuery.fx.speeds[time2] || time2 : time2;
            type = type || "fx";
            return this.queue(type, function(next, hooks) {
              var timeout = window2.setTimeout(next, time2);
              hooks.stop = function() {
                window2.clearTimeout(timeout);
              };
            });
          };
          (function() {
            var input = document2.createElement("input"), select = document2.createElement("select"), opt = select.appendChild(document2.createElement("option"));
            input.type = "checkbox";
            support.checkOn = input.value !== "";
            support.optSelected = opt.selected;
            input = document2.createElement("input");
            input.value = "t";
            input.type = "radio";
            support.radioValue = input.value === "t";
          })();
          var boolHook, attrHandle = jQuery.expr.attrHandle;
          jQuery.fn.extend({
            attr: function(name, value) {
              return access(this, jQuery.attr, name, value, arguments.length > 1);
            },
            removeAttr: function(name) {
              return this.each(function() {
                jQuery.removeAttr(this, name);
              });
            }
          });
          jQuery.extend({
            attr: function(elem, name, value) {
              var ret, hooks, nType = elem.nodeType;
              if (nType === 3 || nType === 8 || nType === 2) {
                return;
              }
              if (typeof elem.getAttribute === "undefined") {
                return jQuery.prop(elem, name, value);
              }
              if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
                hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0);
              }
              if (value !== void 0) {
                if (value === null) {
                  jQuery.removeAttr(elem, name);
                  return;
                }
                if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
                  return ret;
                }
                elem.setAttribute(name, value + "");
                return value;
              }
              if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
                return ret;
              }
              ret = jQuery.find.attr(elem, name);
              return ret == null ? void 0 : ret;
            },
            attrHooks: {
              type: {
                set: function(elem, value) {
                  if (!support.radioValue && value === "radio" && nodeName(elem, "input")) {
                    var val = elem.value;
                    elem.setAttribute("type", value);
                    if (val) {
                      elem.value = val;
                    }
                    return value;
                  }
                }
              }
            },
            removeAttr: function(elem, value) {
              var name, i = 0, attrNames = value && value.match(rnothtmlwhite);
              if (attrNames && elem.nodeType === 1) {
                while (name = attrNames[i++]) {
                  elem.removeAttribute(name);
                }
              }
            }
          });
          boolHook = {
            set: function(elem, value, name) {
              if (value === false) {
                jQuery.removeAttr(elem, name);
              } else {
                elem.setAttribute(name, name);
              }
              return name;
            }
          };
          jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(_i, name) {
            var getter = attrHandle[name] || jQuery.find.attr;
            attrHandle[name] = function(elem, name2, isXML) {
              var ret, handle, lowercaseName = name2.toLowerCase();
              if (!isXML) {
                handle = attrHandle[lowercaseName];
                attrHandle[lowercaseName] = ret;
                ret = getter(elem, name2, isXML) != null ? lowercaseName : null;
                attrHandle[lowercaseName] = handle;
              }
              return ret;
            };
          });
          var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i;
          jQuery.fn.extend({
            prop: function(name, value) {
              return access(this, jQuery.prop, name, value, arguments.length > 1);
            },
            removeProp: function(name) {
              return this.each(function() {
                delete this[jQuery.propFix[name] || name];
              });
            }
          });
          jQuery.extend({
            prop: function(elem, name, value) {
              var ret, hooks, nType = elem.nodeType;
              if (nType === 3 || nType === 8 || nType === 2) {
                return;
              }
              if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
                name = jQuery.propFix[name] || name;
                hooks = jQuery.propHooks[name];
              }
              if (value !== void 0) {
                if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
                  return ret;
                }
                return elem[name] = value;
              }
              if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
                return ret;
              }
              return elem[name];
            },
            propHooks: {
              tabIndex: {
                get: function(elem) {
                  var tabindex = jQuery.find.attr(elem, "tabindex");
                  if (tabindex) {
                    return parseInt(tabindex, 10);
                  }
                  if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) {
                    return 0;
                  }
                  return -1;
                }
              }
            },
            propFix: {
              "for": "htmlFor",
              "class": "className"
            }
          });
          if (!support.optSelected) {
            jQuery.propHooks.selected = {
              get: function(elem) {
                var parent = elem.parentNode;
                if (parent && parent.parentNode) {
                  parent.parentNode.selectedIndex;
                }
                return null;
              },
              set: function(elem) {
                var parent = elem.parentNode;
                if (parent) {
                  parent.selectedIndex;
                  if (parent.parentNode) {
                    parent.parentNode.selectedIndex;
                  }
                }
              }
            };
          }
          jQuery.each([
            "tabIndex",
            "readOnly",
            "maxLength",
            "cellSpacing",
            "cellPadding",
            "rowSpan",
            "colSpan",
            "useMap",
            "frameBorder",
            "contentEditable"
          ], function() {
            jQuery.propFix[this.toLowerCase()] = this;
          });
          function stripAndCollapse(value) {
            var tokens = value.match(rnothtmlwhite) || [];
            return tokens.join(" ");
          }
          function getClass(elem) {
            return elem.getAttribute && elem.getAttribute("class") || "";
          }
          function classesToArray(value) {
            if (Array.isArray(value)) {
              return value;
            }
            if (typeof value === "string") {
              return value.match(rnothtmlwhite) || [];
            }
            return [];
          }
          jQuery.fn.extend({
            addClass: function(value) {
              var classNames, cur, curValue, className, i, finalValue;
              if (isFunction2(value)) {
                return this.each(function(j) {
                  jQuery(this).addClass(value.call(this, j, getClass(this)));
                });
              }
              classNames = classesToArray(value);
              if (classNames.length) {
                return this.each(function() {
                  curValue = getClass(this);
                  cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
                  if (cur) {
                    for (i = 0; i < classNames.length; i++) {
                      className = classNames[i];
                      if (cur.indexOf(" " + className + " ") < 0) {
                        cur += className + " ";
                      }
                    }
                    finalValue = stripAndCollapse(cur);
                    if (curValue !== finalValue) {
                      this.setAttribute("class", finalValue);
                    }
                  }
                });
              }
              return this;
            },
            removeClass: function(value) {
              var classNames, cur, curValue, className, i, finalValue;
              if (isFunction2(value)) {
                return this.each(function(j) {
                  jQuery(this).removeClass(value.call(this, j, getClass(this)));
                });
              }
              if (!arguments.length) {
                return this.attr("class", "");
              }
              classNames = classesToArray(value);
              if (classNames.length) {
                return this.each(function() {
                  curValue = getClass(this);
                  cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
                  if (cur) {
                    for (i = 0; i < classNames.length; i++) {
                      className = classNames[i];
                      while (cur.indexOf(" " + className + " ") > -1) {
                        cur = cur.replace(" " + className + " ", " ");
                      }
                    }
                    finalValue = stripAndCollapse(cur);
                    if (curValue !== finalValue) {
                      this.setAttribute("class", finalValue);
                    }
                  }
                });
              }
              return this;
            },
            toggleClass: function(value, stateVal) {
              var classNames, className, i, self2, type = typeof value, isValidValue = type === "string" || Array.isArray(value);
              if (isFunction2(value)) {
                return this.each(function(i2) {
                  jQuery(this).toggleClass(
                    value.call(this, i2, getClass(this), stateVal),
                    stateVal
                  );
                });
              }
              if (typeof stateVal === "boolean" && isValidValue) {
                return stateVal ? this.addClass(value) : this.removeClass(value);
              }
              classNames = classesToArray(value);
              return this.each(function() {
                if (isValidValue) {
                  self2 = jQuery(this);
                  for (i = 0; i < classNames.length; i++) {
                    className = classNames[i];
                    if (self2.hasClass(className)) {
                      self2.removeClass(className);
                    } else {
                      self2.addClass(className);
                    }
                  }
                } else if (value === void 0 || type === "boolean") {
                  className = getClass(this);
                  if (className) {
                    dataPriv.set(this, "__className__", className);
                  }
                  if (this.setAttribute) {
                    this.setAttribute(
                      "class",
                      className || value === false ? "" : dataPriv.get(this, "__className__") || ""
                    );
                  }
                }
              });
            },
            hasClass: function(selector) {
              var className, elem, i = 0;
              className = " " + selector + " ";
              while (elem = this[i++]) {
                if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {
                  return true;
                }
              }
              return false;
            }
          });
          var rreturn = /\r/g;
          jQuery.fn.extend({
            val: function(value) {
              var hooks, ret, valueIsFunction, elem = this[0];
              if (!arguments.length) {
                if (elem) {
                  hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
                  if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) {
                    return ret;
                  }
                  ret = elem.value;
                  if (typeof ret === "string") {
                    return ret.replace(rreturn, "");
                  }
                  return ret == null ? "" : ret;
                }
                return;
              }
              valueIsFunction = isFunction2(value);
              return this.each(function(i) {
                var val;
                if (this.nodeType !== 1) {
                  return;
                }
                if (valueIsFunction) {
                  val = value.call(this, i, jQuery(this).val());
                } else {
                  val = value;
                }
                if (val == null) {
                  val = "";
                } else if (typeof val === "number") {
                  val += "";
                } else if (Array.isArray(val)) {
                  val = jQuery.map(val, function(value2) {
                    return value2 == null ? "" : value2 + "";
                  });
                }
                hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
                if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) {
                  this.value = val;
                }
              });
            }
          });
          jQuery.extend({
            valHooks: {
              option: {
                get: function(elem) {
                  var val = jQuery.find.attr(elem, "value");
                  return val != null ? val : (
                    // Support: IE <=10 - 11 only
                    // option.text throws exceptions (trac-14686, trac-14858)
                    // Strip and collapse whitespace
                    // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
                    stripAndCollapse(jQuery.text(elem))
                  );
                }
              },
              select: {
                get: function(elem) {
                  var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max2 = one ? index + 1 : options.length;
                  if (index < 0) {
                    i = max2;
                  } else {
                    i = one ? index : 0;
                  }
                  for (; i < max2; i++) {
                    option = options[i];
                    if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup
                    !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) {
                      value = jQuery(option).val();
                      if (one) {
                        return value;
                      }
                      values.push(value);
                    }
                  }
                  return values;
                },
                set: function(elem, value) {
                  var optionSet, option, options = elem.options, values = jQuery.makeArray(value), i = options.length;
                  while (i--) {
                    option = options[i];
                    if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) {
                      optionSet = true;
                    }
                  }
                  if (!optionSet) {
                    elem.selectedIndex = -1;
                  }
                  return values;
                }
              }
            }
          });
          jQuery.each(["radio", "checkbox"], function() {
            jQuery.valHooks[this] = {
              set: function(elem, value) {
                if (Array.isArray(value)) {
                  return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;
                }
              }
            };
            if (!support.checkOn) {
              jQuery.valHooks[this].get = function(elem) {
                return elem.getAttribute("value") === null ? "on" : elem.value;
              };
            }
          });
          var location = window2.location;
          var nonce = { guid: Date.now() };
          var rquery = /\?/;
          jQuery.parseXML = function(data) {
            var xml, parserErrorElem;
            if (!data || typeof data !== "string") {
              return null;
            }
            try {
              xml = new window2.DOMParser().parseFromString(data, "text/xml");
            } catch (e) {
            }
            parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0];
            if (!xml || parserErrorElem) {
              jQuery.error("Invalid XML: " + (parserErrorElem ? jQuery.map(parserErrorElem.childNodes, function(el) {
                return el.textContent;
              }).join("\n") : data));
            }
            return xml;
          };
          var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) {
            e.stopPropagation();
          };
          jQuery.extend(jQuery.event, {
            trigger: function(event, data, elem, onlyHandlers) {
              var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document2], type = hasOwn2.call(event, "type") ? event.type : event, namespaces = hasOwn2.call(event, "namespace") ? event.namespace.split(".") : [];
              cur = lastElement = tmp = elem = elem || document2;
              if (elem.nodeType === 3 || elem.nodeType === 8) {
                return;
              }
              if (rfocusMorph.test(type + jQuery.event.triggered)) {
                return;
              }
              if (type.indexOf(".") > -1) {
                namespaces = type.split(".");
                type = namespaces.shift();
                namespaces.sort();
              }
              ontype = type.indexOf(":") < 0 && "on" + type;
              event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event);
              event.isTrigger = onlyHandlers ? 2 : 3;
              event.namespace = namespaces.join(".");
              event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
              event.result = void 0;
              if (!event.target) {
                event.target = elem;
              }
              data = data == null ? [event] : jQuery.makeArray(data, [event]);
              special = jQuery.event.special[type] || {};
              if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
                return;
              }
              if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {
                bubbleType = special.delegateType || type;
                if (!rfocusMorph.test(bubbleType + type)) {
                  cur = cur.parentNode;
                }
                for (; cur; cur = cur.parentNode) {
                  eventPath.push(cur);
                  tmp = cur;
                }
                if (tmp === (elem.ownerDocument || document2)) {
                  eventPath.push(tmp.defaultView || tmp.parentWindow || window2);
                }
              }
              i = 0;
              while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
                lastElement = cur;
                event.type = i > 1 ? bubbleType : special.bindType || type;
                handle = (dataPriv.get(cur, "events") || /* @__PURE__ */ Object.create(null))[event.type] && dataPriv.get(cur, "handle");
                if (handle) {
                  handle.apply(cur, data);
                }
                handle = ontype && cur[ontype];
                if (handle && handle.apply && acceptData(cur)) {
                  event.result = handle.apply(cur, data);
                  if (event.result === false) {
                    event.preventDefault();
                  }
                }
              }
              event.type = type;
              if (!onlyHandlers && !event.isDefaultPrevented()) {
                if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {
                  if (ontype && isFunction2(elem[type]) && !isWindow(elem)) {
                    tmp = elem[ontype];
                    if (tmp) {
                      elem[ontype] = null;
                    }
                    jQuery.event.triggered = type;
                    if (event.isPropagationStopped()) {
                      lastElement.addEventListener(type, stopPropagationCallback);
                    }
                    elem[type]();
                    if (event.isPropagationStopped()) {
                      lastElement.removeEventListener(type, stopPropagationCallback);
                    }
                    jQuery.event.triggered = void 0;
                    if (tmp) {
                      elem[ontype] = tmp;
                    }
                  }
                }
              }
              return event.result;
            },
            // Piggyback on a donor event to simulate a different one
            // Used only for `focus(in | out)` events
            simulate: function(type, elem, event) {
              var e = jQuery.extend(
                new jQuery.Event(),
                event,
                {
                  type,
                  isSimulated: true
                }
              );
              jQuery.event.trigger(e, null, elem);
            }
          });
          jQuery.fn.extend({
            trigger: function(type, data) {
              return this.each(function() {
                jQuery.event.trigger(type, data, this);
              });
            },
            triggerHandler: function(type, data) {
              var elem = this[0];
              if (elem) {
                return jQuery.event.trigger(type, data, elem, true);
              }
            }
          });
          var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i;
          function buildParams(prefix2, obj, traditional, add) {
            var name;
            if (Array.isArray(obj)) {
              jQuery.each(obj, function(i, v) {
                if (traditional || rbracket.test(prefix2)) {
                  add(prefix2, v);
                } else {
                  buildParams(
                    prefix2 + "[" + (typeof v === "object" && v != null ? i : "") + "]",
                    v,
                    traditional,
                    add
                  );
                }
              });
            } else if (!traditional && toType(obj) === "object") {
              for (name in obj) {
                buildParams(prefix2 + "[" + name + "]", obj[name], traditional, add);
              }
            } else {
              add(prefix2, obj);
            }
          }
          jQuery.param = function(a, traditional) {
            var prefix2, s = [], add = function(key, valueOrFunction) {
              var value = isFunction2(valueOrFunction) ? valueOrFunction() : valueOrFunction;
              s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value);
            };
            if (a == null) {
              return "";
            }
            if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
              jQuery.each(a, function() {
                add(this.name, this.value);
              });
            } else {
              for (prefix2 in a) {
                buildParams(prefix2, a[prefix2], traditional, add);
              }
            }
            return s.join("&");
          };
          jQuery.fn.extend({
            serialize: function() {
              return jQuery.param(this.serializeArray());
            },
            serializeArray: function() {
              return this.map(function() {
                var elements = jQuery.prop(this, "elements");
                return elements ? jQuery.makeArray(elements) : this;
              }).filter(function() {
                var type = this.type;
                return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
              }).map(function(_i, elem) {
                var val = jQuery(this).val();
                if (val == null) {
                  return null;
                }
                if (Array.isArray(val)) {
                  return jQuery.map(val, function(val2) {
                    return { name: elem.name, value: val2.replace(rCRLF, "\r\n") };
                  });
                }
                return { name: elem.name, value: val.replace(rCRLF, "\r\n") };
              }).get();
            }
          });
          var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, prefilters = {}, transports = {}, allTypes = "*/".concat("*"), originAnchor = document2.createElement("a");
          originAnchor.href = location.href;
          function addToPrefiltersOrTransports(structure) {
            return function(dataTypeExpression, func) {
              if (typeof dataTypeExpression !== "string") {
                func = dataTypeExpression;
                dataTypeExpression = "*";
              }
              var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];
              if (isFunction2(func)) {
                while (dataType = dataTypes[i++]) {
                  if (dataType[0] === "+") {
                    dataType = dataType.slice(1) || "*";
                    (structure[dataType] = structure[dataType] || []).unshift(func);
                  } else {
                    (structure[dataType] = structure[dataType] || []).push(func);
                  }
                }
              }
            };
          }
          function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
            var inspected = {}, seekingTransport = structure === transports;
            function inspect2(dataType) {
              var selected;
              inspected[dataType] = true;
              jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) {
                var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
                if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
                  options.dataTypes.unshift(dataTypeOrTransport);
                  inspect2(dataTypeOrTransport);
                  return false;
                } else if (seekingTransport) {
                  return !(selected = dataTypeOrTransport);
                }
              });
              return selected;
            }
            return inspect2(options.dataTypes[0]) || !inspected["*"] && inspect2("*");
          }
          function ajaxExtend(target, src) {
            var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};
            for (key in src) {
              if (src[key] !== void 0) {
                (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
              }
            }
            if (deep) {
              jQuery.extend(true, target, deep);
            }
            return target;
          }
          function ajaxHandleResponses(s, jqXHR, responses) {
            var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes;
            while (dataTypes[0] === "*") {
              dataTypes.shift();
              if (ct === void 0) {
                ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
              }
            }
            if (ct) {
              for (type in contents) {
                if (contents[type] && contents[type].test(ct)) {
                  dataTypes.unshift(type);
                  break;
                }
              }
            }
            if (dataTypes[0] in responses) {
              finalDataType = dataTypes[0];
            } else {
              for (type in responses) {
                if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
                  finalDataType = type;
                  break;
                }
                if (!firstDataType) {
                  firstDataType = type;
                }
              }
              finalDataType = finalDataType || firstDataType;
            }
            if (finalDataType) {
              if (finalDataType !== dataTypes[0]) {
                dataTypes.unshift(finalDataType);
              }
              return responses[finalDataType];
            }
          }
          function ajaxConvert(s, response, jqXHR, isSuccess) {
            var conv2, current, conv, tmp, prev, converters = {}, dataTypes = s.dataTypes.slice();
            if (dataTypes[1]) {
              for (conv in s.converters) {
                converters[conv.toLowerCase()] = s.converters[conv];
              }
            }
            current = dataTypes.shift();
            while (current) {
              if (s.responseFields[current]) {
                jqXHR[s.responseFields[current]] = response;
              }
              if (!prev && isSuccess && s.dataFilter) {
                response = s.dataFilter(response, s.dataType);
              }
              prev = current;
              current = dataTypes.shift();
              if (current) {
                if (current === "*") {
                  current = prev;
                } else if (prev !== "*" && prev !== current) {
                  conv = converters[prev + " " + current] || converters["* " + current];
                  if (!conv) {
                    for (conv2 in converters) {
                      tmp = conv2.split(" ");
                      if (tmp[1] === current) {
                        conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
                        if (conv) {
                          if (conv === true) {
                            conv = converters[conv2];
                          } else if (converters[conv2] !== true) {
                            current = tmp[0];
                            dataTypes.unshift(tmp[1]);
                          }
                          break;
                        }
                      }
                    }
                  }
                  if (conv !== true) {
                    if (conv && s.throws) {
                      response = conv(response);
                    } else {
                      try {
                        response = conv(response);
                      } catch (e) {
                        return {
                          state: "parsererror",
                          error: conv ? e : "No conversion from " + prev + " to " + current
                        };
                      }
                    }
                  }
                }
              }
            }
            return { state: "success", data: response };
          }
          jQuery.extend({
            // Counter for holding the number of active queries
            active: 0,
            // Last-Modified header cache for next request
            lastModified: {},
            etag: {},
            ajaxSettings: {
              url: location.href,
              type: "GET",
              isLocal: rlocalProtocol.test(location.protocol),
              global: true,
              processData: true,
              async: true,
              contentType: "application/x-www-form-urlencoded; charset=UTF-8",
              /*
              timeout: 0,
              data: null,
              dataType: null,
              username: null,
              password: null,
              cache: null,
              throws: false,
              traditional: false,
              headers: {},
              */
              accepts: {
                "*": allTypes,
                text: "text/plain",
                html: "text/html",
                xml: "application/xml, text/xml",
                json: "application/json, text/javascript"
              },
              contents: {
                xml: /\bxml\b/,
                html: /\bhtml/,
                json: /\bjson\b/
              },
              responseFields: {
                xml: "responseXML",
                text: "responseText",
                json: "responseJSON"
              },
              // Data converters
              // Keys separate source (or catchall "*") and destination types with a single space
              converters: {
                // Convert anything to text
                "* text": String,
                // Text to html (true = no transformation)
                "text html": true,
                // Evaluate text as a json expression
                "text json": JSON.parse,
                // Parse text as xml
                "text xml": jQuery.parseXML
              },
              // For options that shouldn't be deep extended:
              // you can add your own custom options here if
              // and when you create one that shouldn't be
              // deep extended (see ajaxExtend)
              flatOptions: {
                url: true,
                context: true
              }
            },
            // Creates a full fledged settings object into target
            // with both ajaxSettings and settings fields.
            // If target is omitted, writes into ajaxSettings.
            ajaxSetup: function(target, settings) {
              return settings ? (
                // Building a settings object
                ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings)
              ) : (
                // Extending ajaxSettings
                ajaxExtend(jQuery.ajaxSettings, target)
              );
            },
            ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
            ajaxTransport: addToPrefiltersOrTransports(transports),
            // Main method
            ajax: function(url, options) {
              if (typeof url === "object") {
                options = url;
                url = void 0;
              }
              options = options || {};
              var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed2, fireGlobals, i, uncached, s = jQuery.ajaxSetup({}, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), statusCode = s.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = {
                readyState: 0,
                // Builds headers hashtable if needed
                getResponseHeader: function(key) {
                  var match;
                  if (completed2) {
                    if (!responseHeaders) {
                      responseHeaders = {};
                      while (match = rheaders.exec(responseHeadersString)) {
                        responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]);
                      }
                    }
                    match = responseHeaders[key.toLowerCase() + " "];
                  }
                  return match == null ? null : match.join(", ");
                },
                // Raw string
                getAllResponseHeaders: function() {
                  return completed2 ? responseHeadersString : null;
                },
                // Caches the header
                setRequestHeader: function(name, value) {
                  if (completed2 == null) {
                    name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name;
                    requestHeaders[name] = value;
                  }
                  return this;
                },
                // Overrides response content-type header
                overrideMimeType: function(type) {
                  if (completed2 == null) {
                    s.mimeType = type;
                  }
                  return this;
                },
                // Status-dependent callbacks
                statusCode: function(map) {
                  var code;
                  if (map) {
                    if (completed2) {
                      jqXHR.always(map[jqXHR.status]);
                    } else {
                      for (code in map) {
                        statusCode[code] = [statusCode[code], map[code]];
                      }
                    }
                  }
                  return this;
                },
                // Cancel the request
                abort: function(statusText) {
                  var finalText = statusText || strAbort;
                  if (transport) {
                    transport.abort(finalText);
                  }
                  done(0, finalText);
                  return this;
                }
              };
              deferred.promise(jqXHR);
              s.url = ((url || s.url || location.href) + "").replace(rprotocol, location.protocol + "//");
              s.type = options.method || options.type || s.method || s.type;
              s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""];
              if (s.crossDomain == null) {
                urlAnchor = document2.createElement("a");
                try {
                  urlAnchor.href = s.url;
                  urlAnchor.href = urlAnchor.href;
                  s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host;
                } catch (e) {
                  s.crossDomain = true;
                }
              }
              if (s.data && s.processData && typeof s.data !== "string") {
                s.data = jQuery.param(s.data, s.traditional);
              }
              inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
              if (completed2) {
                return jqXHR;
              }
              fireGlobals = jQuery.event && s.global;
              if (fireGlobals && jQuery.active++ === 0) {
                jQuery.event.trigger("ajaxStart");
              }
              s.type = s.type.toUpperCase();
              s.hasContent = !rnoContent.test(s.type);
              cacheURL = s.url.replace(rhash, "");
              if (!s.hasContent) {
                uncached = s.url.slice(cacheURL.length);
                if (s.data && (s.processData || typeof s.data === "string")) {
                  cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data;
                  delete s.data;
                }
                if (s.cache === false) {
                  cacheURL = cacheURL.replace(rantiCache, "$1");
                  uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached;
                }
                s.url = cacheURL + uncached;
              } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {
                s.data = s.data.replace(r20, "+");
              }
              if (s.ifModified) {
                if (jQuery.lastModified[cacheURL]) {
                  jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
                }
                if (jQuery.etag[cacheURL]) {
                  jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
                }
              }
              if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
                jqXHR.setRequestHeader("Content-Type", s.contentType);
              }
              jqXHR.setRequestHeader(
                "Accept",
                s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]
              );
              for (i in s.headers) {
                jqXHR.setRequestHeader(i, s.headers[i]);
              }
              if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed2)) {
                return jqXHR.abort();
              }
              strAbort = "abort";
              completeDeferred.add(s.complete);
              jqXHR.done(s.success);
              jqXHR.fail(s.error);
              transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
              if (!transport) {
                done(-1, "No Transport");
              } else {
                jqXHR.readyState = 1;
                if (fireGlobals) {
                  globalEventContext.trigger("ajaxSend", [jqXHR, s]);
                }
                if (completed2) {
                  return jqXHR;
                }
                if (s.async && s.timeout > 0) {
                  timeoutTimer = window2.setTimeout(function() {
                    jqXHR.abort("timeout");
                  }, s.timeout);
                }
                try {
                  completed2 = false;
                  transport.send(requestHeaders, done);
                } catch (e) {
                  if (completed2) {
                    throw e;
                  }
                  done(-1, e);
                }
              }
              function done(status, nativeStatusText, responses, headers) {
                var isSuccess, success, error, response, modified, statusText = nativeStatusText;
                if (completed2) {
                  return;
                }
                completed2 = true;
                if (timeoutTimer) {
                  window2.clearTimeout(timeoutTimer);
                }
                transport = void 0;
                responseHeadersString = headers || "";
                jqXHR.readyState = status > 0 ? 4 : 0;
                isSuccess = status >= 200 && status < 300 || status === 304;
                if (responses) {
                  response = ajaxHandleResponses(s, jqXHR, responses);
                }
                if (!isSuccess && jQuery.inArray("script", s.dataTypes) > -1 && jQuery.inArray("json", s.dataTypes) < 0) {
                  s.converters["text script"] = function() {
                  };
                }
                response = ajaxConvert(s, response, jqXHR, isSuccess);
                if (isSuccess) {
                  if (s.ifModified) {
                    modified = jqXHR.getResponseHeader("Last-Modified");
                    if (modified) {
                      jQuery.lastModified[cacheURL] = modified;
                    }
                    modified = jqXHR.getResponseHeader("etag");
                    if (modified) {
                      jQuery.etag[cacheURL] = modified;
                    }
                  }
                  if (status === 204 || s.type === "HEAD") {
                    statusText = "nocontent";
                  } else if (status === 304) {
                    statusText = "notmodified";
                  } else {
                    statusText = response.state;
                    success = response.data;
                    error = response.error;
                    isSuccess = !error;
                  }
                } else {
                  error = statusText;
                  if (status || !statusText) {
                    statusText = "error";
                    if (status < 0) {
                      status = 0;
                    }
                  }
                }
                jqXHR.status = status;
                jqXHR.statusText = (nativeStatusText || statusText) + "";
                if (isSuccess) {
                  deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
                } else {
                  deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
                }
                jqXHR.statusCode(statusCode);
                statusCode = void 0;
                if (fireGlobals) {
                  globalEventContext.trigger(
                    isSuccess ? "ajaxSuccess" : "ajaxError",
                    [jqXHR, s, isSuccess ? success : error]
                  );
                }
                completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
                if (fireGlobals) {
                  globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
                  if (!--jQuery.active) {
                    jQuery.event.trigger("ajaxStop");
                  }
                }
              }
              return jqXHR;
            },
            getJSON: function(url, data, callback) {
              return jQuery.get(url, data, callback, "json");
            },
            getScript: function(url, callback) {
              return jQuery.get(url, void 0, callback, "script");
            }
          });
          jQuery.each(["get", "post"], function(_i, method) {
            jQuery[method] = function(url, data, callback, type) {
              if (isFunction2(data)) {
                type = type || callback;
                callback = data;
                data = void 0;
              }
              return jQuery.ajax(jQuery.extend({
                url,
                type: method,
                dataType: type,
                data,
                success: callback
              }, jQuery.isPlainObject(url) && url));
            };
          });
          jQuery.ajaxPrefilter(function(s) {
            var i;
            for (i in s.headers) {
              if (i.toLowerCase() === "content-type") {
                s.contentType = s.headers[i] || "";
              }
            }
          });
          jQuery._evalUrl = function(url, options, doc) {
            return jQuery.ajax({
              url,
              // Make this explicit, since user can override this through ajaxSetup (trac-11264)
              type: "GET",
              dataType: "script",
              cache: true,
              async: false,
              global: false,
              // Only evaluate the response if it is successful (gh-4126)
              // dataFilter is not invoked for failure responses, so using it instead
              // of the default converter is kludgy but it works.
              converters: {
                "text script": function() {
                }
              },
              dataFilter: function(response) {
                jQuery.globalEval(response, options, doc);
              }
            });
          };
          jQuery.fn.extend({
            wrapAll: function(html) {
              var wrap;
              if (this[0]) {
                if (isFunction2(html)) {
                  html = html.call(this[0]);
                }
                wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
                if (this[0].parentNode) {
                  wrap.insertBefore(this[0]);
                }
                wrap.map(function() {
                  var elem = this;
                  while (elem.firstElementChild) {
                    elem = elem.firstElementChild;
                  }
                  return elem;
                }).append(this);
              }
              return this;
            },
            wrapInner: function(html) {
              if (isFunction2(html)) {
                return this.each(function(i) {
                  jQuery(this).wrapInner(html.call(this, i));
                });
              }
              return this.each(function() {
                var self2 = jQuery(this), contents = self2.contents();
                if (contents.length) {
                  contents.wrapAll(html);
                } else {
                  self2.append(html);
                }
              });
            },
            wrap: function(html) {
              var htmlIsFunction = isFunction2(html);
              return this.each(function(i) {
                jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);
              });
            },
            unwrap: function(selector) {
              this.parent(selector).not("body").each(function() {
                jQuery(this).replaceWith(this.childNodes);
              });
              return this;
            }
          });
          jQuery.expr.pseudos.hidden = function(elem) {
            return !jQuery.expr.pseudos.visible(elem);
          };
          jQuery.expr.pseudos.visible = function(elem) {
            return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
          };
          jQuery.ajaxSettings.xhr = function() {
            try {
              return new window2.XMLHttpRequest();
            } catch (e) {
            }
          };
          var xhrSuccessStatus = {
            // File protocol always yields status code 0, assume 200
            0: 200,
            // Support: IE <=9 only
            // trac-1450: sometimes IE returns 1223 when it should be 204
            1223: 204
          }, xhrSupported = jQuery.ajaxSettings.xhr();
          support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
          support.ajax = xhrSupported = !!xhrSupported;
          jQuery.ajaxTransport(function(options) {
            var callback, errorCallback;
            if (support.cors || xhrSupported && !options.crossDomain) {
              return {
                send: function(headers, complete) {
                  var i, xhr = options.xhr();
                  xhr.open(
                    options.type,
                    options.url,
                    options.async,
                    options.username,
                    options.password
                  );
                  if (options.xhrFields) {
                    for (i in options.xhrFields) {
                      xhr[i] = options.xhrFields[i];
                    }
                  }
                  if (options.mimeType && xhr.overrideMimeType) {
                    xhr.overrideMimeType(options.mimeType);
                  }
                  if (!options.crossDomain && !headers["X-Requested-With"]) {
                    headers["X-Requested-With"] = "XMLHttpRequest";
                  }
                  for (i in headers) {
                    xhr.setRequestHeader(i, headers[i]);
                  }
                  callback = function(type) {
                    return function() {
                      if (callback) {
                        callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;
                        if (type === "abort") {
                          xhr.abort();
                        } else if (type === "error") {
                          if (typeof xhr.status !== "number") {
                            complete(0, "error");
                          } else {
                            complete(
                              // File: protocol always yields status 0; see trac-8605, trac-14207
                              xhr.status,
                              xhr.statusText
                            );
                          }
                        } else {
                          complete(
                            xhrSuccessStatus[xhr.status] || xhr.status,
                            xhr.statusText,
                            // Support: IE <=9 only
                            // IE9 has no XHR2 but throws on binary (trac-11426)
                            // For XHR2 non-text, let the caller handle it (gh-2498)
                            (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText },
                            xhr.getAllResponseHeaders()
                          );
                        }
                      }
                    };
                  };
                  xhr.onload = callback();
                  errorCallback = xhr.onerror = xhr.ontimeout = callback("error");
                  if (xhr.onabort !== void 0) {
                    xhr.onabort = errorCallback;
                  } else {
                    xhr.onreadystatechange = function() {
                      if (xhr.readyState === 4) {
                        window2.setTimeout(function() {
                          if (callback) {
                            errorCallback();
                          }
                        });
                      }
                    };
                  }
                  callback = callback("abort");
                  try {
                    xhr.send(options.hasContent && options.data || null);
                  } catch (e) {
                    if (callback) {
                      throw e;
                    }
                  }
                },
                abort: function() {
                  if (callback) {
                    callback();
                  }
                }
              };
            }
          });
          jQuery.ajaxPrefilter(function(s) {
            if (s.crossDomain) {
              s.contents.script = false;
            }
          });
          jQuery.ajaxSetup({
            accepts: {
              script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
            },
            contents: {
              script: /\b(?:java|ecma)script\b/
            },
            converters: {
              "text script": function(text) {
                jQuery.globalEval(text);
                return text;
              }
            }
          });
          jQuery.ajaxPrefilter("script", function(s) {
            if (s.cache === void 0) {
              s.cache = false;
            }
            if (s.crossDomain) {
              s.type = "GET";
            }
          });
          jQuery.ajaxTransport("script", function(s) {
            if (s.crossDomain || s.scriptAttrs) {
              var script, callback;
              return {
                send: function(_, complete) {
                  script = jQuery("<script>").attr(s.scriptAttrs || {}).prop({ charset: s.scriptCharset, src: s.url }).on("load error", callback = function(evt) {
                    script.remove();
                    callback = null;
                    if (evt) {
                      complete(evt.type === "error" ? 404 : 200, evt.type);
                    }
                  });
                  document2.head.appendChild(script[0]);
                },
                abort: function() {
                  if (callback) {
                    callback();
                  }
                }
              };
            }
          });
          var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/;
          jQuery.ajaxSetup({
            jsonp: "callback",
            jsonpCallback: function() {
              var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce.guid++;
              this[callback] = true;
              return callback;
            }
          });
          jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) {
            var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s.data) && "data");
            if (jsonProp || s.dataTypes[0] === "jsonp") {
              callbackName = s.jsonpCallback = isFunction2(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback;
              if (jsonProp) {
                s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
              } else if (s.jsonp !== false) {
                s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName;
              }
              s.converters["script json"] = function() {
                if (!responseContainer) {
                  jQuery.error(callbackName + " was not called");
                }
                return responseContainer[0];
              };
              s.dataTypes[0] = "json";
              overwritten = window2[callbackName];
              window2[callbackName] = function() {
                responseContainer = arguments;
              };
              jqXHR.always(function() {
                if (overwritten === void 0) {
                  jQuery(window2).removeProp(callbackName);
                } else {
                  window2[callbackName] = overwritten;
                }
                if (s[callbackName]) {
                  s.jsonpCallback = originalSettings.jsonpCallback;
                  oldCallbacks.push(callbackName);
                }
                if (responseContainer && isFunction2(overwritten)) {
                  overwritten(responseContainer[0]);
                }
                responseContainer = overwritten = void 0;
              });
              return "script";
            }
          });
          support.createHTMLDocument = function() {
            var body = document2.implementation.createHTMLDocument("").body;
            body.innerHTML = "<form></form><form></form>";
            return body.childNodes.length === 2;
          }();
          jQuery.parseHTML = function(data, context, keepScripts) {
            if (typeof data !== "string") {
              return [];
            }
            if (typeof context === "boolean") {
              keepScripts = context;
              context = false;
            }
            var base2, parsed, scripts;
            if (!context) {
              if (support.createHTMLDocument) {
                context = document2.implementation.createHTMLDocument("");
                base2 = context.createElement("base");
                base2.href = document2.location.href;
                context.head.appendChild(base2);
              } else {
                context = document2;
              }
            }
            parsed = rsingleTag.exec(data);
            scripts = !keepScripts && [];
            if (parsed) {
              return [context.createElement(parsed[1])];
            }
            parsed = buildFragment([data], context, scripts);
            if (scripts && scripts.length) {
              jQuery(scripts).remove();
            }
            return jQuery.merge([], parsed.childNodes);
          };
          jQuery.fn.load = function(url, params, callback) {
            var selector, type, response, self2 = this, off2 = url.indexOf(" ");
            if (off2 > -1) {
              selector = stripAndCollapse(url.slice(off2));
              url = url.slice(0, off2);
            }
            if (isFunction2(params)) {
              callback = params;
              params = void 0;
            } else if (params && typeof params === "object") {
              type = "POST";
            }
            if (self2.length > 0) {
              jQuery.ajax({
                url,
                // If "type" variable is undefined, then "GET" method will be used.
                // Make value of this field explicit since
                // user can override it through ajaxSetup method
                type: type || "GET",
                dataType: "html",
                data: params
              }).done(function(responseText) {
                response = arguments;
                self2.html(selector ? (
                  // If a selector was specified, locate the right elements in a dummy div
                  // Exclude scripts to avoid IE 'Permission Denied' errors
                  jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector)
                ) : (
                  // Otherwise use the full result
                  responseText
                ));
              }).always(callback && function(jqXHR, status) {
                self2.each(function() {
                  callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
                });
              });
            }
            return this;
          };
          jQuery.expr.pseudos.animated = function(elem) {
            return jQuery.grep(jQuery.timers, function(fn) {
              return elem === fn.elem;
            }).length;
          };
          jQuery.offset = {
            setOffset: function(elem, options, i) {
              var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css(elem, "position"), curElem = jQuery(elem), props = {};
              if (position === "static") {
                elem.style.position = "relative";
              }
              curOffset = curElem.offset();
              curCSSTop = jQuery.css(elem, "top");
              curCSSLeft = jQuery.css(elem, "left");
              calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
              if (calculatePosition) {
                curPosition = curElem.position();
                curTop = curPosition.top;
                curLeft = curPosition.left;
              } else {
                curTop = parseFloat(curCSSTop) || 0;
                curLeft = parseFloat(curCSSLeft) || 0;
              }
              if (isFunction2(options)) {
                options = options.call(elem, i, jQuery.extend({}, curOffset));
              }
              if (options.top != null) {
                props.top = options.top - curOffset.top + curTop;
              }
              if (options.left != null) {
                props.left = options.left - curOffset.left + curLeft;
              }
              if ("using" in options) {
                options.using.call(elem, props);
              } else {
                curElem.css(props);
              }
            }
          };
          jQuery.fn.extend({
            // offset() relates an element's border box to the document origin
            offset: function(options) {
              if (arguments.length) {
                return options === void 0 ? this : this.each(function(i) {
                  jQuery.offset.setOffset(this, options, i);
                });
              }
              var rect, win, elem = this[0];
              if (!elem) {
                return;
              }
              if (!elem.getClientRects().length) {
                return { top: 0, left: 0 };
              }
              rect = elem.getBoundingClientRect();
              win = elem.ownerDocument.defaultView;
              return {
                top: rect.top + win.pageYOffset,
                left: rect.left + win.pageXOffset
              };
            },
            // position() relates an element's margin box to its offset parent's padding box
            // This corresponds to the behavior of CSS absolute positioning
            position: function() {
              if (!this[0]) {
                return;
              }
              var offsetParent, offset, doc, elem = this[0], parentOffset = { top: 0, left: 0 };
              if (jQuery.css(elem, "position") === "fixed") {
                offset = elem.getBoundingClientRect();
              } else {
                offset = this.offset();
                doc = elem.ownerDocument;
                offsetParent = elem.offsetParent || doc.documentElement;
                while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery.css(offsetParent, "position") === "static") {
                  offsetParent = offsetParent.parentNode;
                }
                if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
                  parentOffset = jQuery(offsetParent).offset();
                  parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true);
                  parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true);
                }
              }
              return {
                top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
                left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
              };
            },
            // This method will return documentElement in the following cases:
            // 1) For the element inside the iframe without offsetParent, this method will return
            //    documentElement of the parent window
            // 2) For the hidden or detached element
            // 3) For body or html element, i.e. in case of the html node - it will return itself
            //
            // but those exceptions were never presented as a real life use-cases
            // and might be considered as more preferable results.
            //
            // This logic, however, is not guaranteed and can change at any point in the future
            offsetParent: function() {
              return this.map(function() {
                var offsetParent = this.offsetParent;
                while (offsetParent && jQuery.css(offsetParent, "position") === "static") {
                  offsetParent = offsetParent.offsetParent;
                }
                return offsetParent || documentElement;
              });
            }
          });
          jQuery.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(method, prop) {
            var top = "pageYOffset" === prop;
            jQuery.fn[method] = function(val) {
              return access(this, function(elem, method2, val2) {
                var win;
                if (isWindow(elem)) {
                  win = elem;
                } else if (elem.nodeType === 9) {
                  win = elem.defaultView;
                }
                if (val2 === void 0) {
                  return win ? win[prop] : elem[method2];
                }
                if (win) {
                  win.scrollTo(
                    !top ? val2 : win.pageXOffset,
                    top ? val2 : win.pageYOffset
                  );
                } else {
                  elem[method2] = val2;
                }
              }, method, val, arguments.length);
            };
          });
          jQuery.each(["top", "left"], function(_i, prop) {
            jQuery.cssHooks[prop] = addGetHookIf(
              support.pixelPosition,
              function(elem, computed2) {
                if (computed2) {
                  computed2 = curCSS(elem, prop);
                  return rnumnonpx.test(computed2) ? jQuery(elem).position()[prop] + "px" : computed2;
                }
              }
            );
          });
          jQuery.each({ Height: "height", Width: "width" }, function(name, type) {
            jQuery.each({
              padding: "inner" + name,
              content: type,
              "": "outer" + name
            }, function(defaultExtra, funcName) {
              jQuery.fn[funcName] = function(margin, value) {
                var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
                return access(this, function(elem, type2, value2) {
                  var doc;
                  if (isWindow(elem)) {
                    return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name];
                  }
                  if (elem.nodeType === 9) {
                    doc = elem.documentElement;
                    return Math.max(
                      elem.body["scroll" + name],
                      doc["scroll" + name],
                      elem.body["offset" + name],
                      doc["offset" + name],
                      doc["client" + name]
                    );
                  }
                  return value2 === void 0 ? (
                    // Get width or height on the element, requesting but not forcing parseFloat
                    jQuery.css(elem, type2, extra)
                  ) : (
                    // Set width or height on the element
                    jQuery.style(elem, type2, value2, extra)
                  );
                }, type, chainable ? margin : void 0, chainable);
              };
            });
          });
          jQuery.each([
            "ajaxStart",
            "ajaxStop",
            "ajaxComplete",
            "ajaxError",
            "ajaxSuccess",
            "ajaxSend"
          ], function(_i, type) {
            jQuery.fn[type] = function(fn) {
              return this.on(type, fn);
            };
          });
          jQuery.fn.extend({
            bind: function(types, data, fn) {
              return this.on(types, null, data, fn);
            },
            unbind: function(types, fn) {
              return this.off(types, null, fn);
            },
            delegate: function(selector, types, data, fn) {
              return this.on(types, selector, data, fn);
            },
            undelegate: function(selector, types, fn) {
              return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
            },
            hover: function(fnOver, fnOut) {
              return this.on("mouseenter", fnOver).on("mouseleave", fnOut || fnOver);
            }
          });
          jQuery.each(
            "blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),
            function(_i, name) {
              jQuery.fn[name] = function(data, fn) {
                return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
              };
            }
          );
          var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
          jQuery.proxy = function(fn, context) {
            var tmp, args, proxy;
            if (typeof context === "string") {
              tmp = fn[context];
              context = fn;
              fn = tmp;
            }
            if (!isFunction2(fn)) {
              return void 0;
            }
            args = slice.call(arguments, 2);
            proxy = function() {
              return fn.apply(context || this, args.concat(slice.call(arguments)));
            };
            proxy.guid = fn.guid = fn.guid || jQuery.guid++;
            return proxy;
          };
          jQuery.holdReady = function(hold) {
            if (hold) {
              jQuery.readyWait++;
            } else {
              jQuery.ready(true);
            }
          };
          jQuery.isArray = Array.isArray;
          jQuery.parseJSON = JSON.parse;
          jQuery.nodeName = nodeName;
          jQuery.isFunction = isFunction2;
          jQuery.isWindow = isWindow;
          jQuery.camelCase = camelCase;
          jQuery.type = toType;
          jQuery.now = Date.now;
          jQuery.isNumeric = function(obj) {
            var type = jQuery.type(obj);
            return (type === "number" || type === "string") && // parseFloat NaNs numeric-cast false positives ("")
            // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
            // subtraction forces infinities to NaN
            !isNaN(obj - parseFloat(obj));
          };
          jQuery.trim = function(text) {
            return text == null ? "" : (text + "").replace(rtrim, "$1");
          };
          var _jQuery = window2.jQuery, _$ = window2.$;
          jQuery.noConflict = function(deep) {
            if (window2.$ === jQuery) {
              window2.$ = _$;
            }
            if (deep && window2.jQuery === jQuery) {
              window2.jQuery = _jQuery;
            }
            return jQuery;
          };
          if (typeof noGlobal === "undefined") {
            window2.jQuery = window2.$ = jQuery;
          }
          return jQuery;
        });
      })(jquery);
      var jqueryExports = jquery.exports;
      const $ = /* @__PURE__ */ getDefaultExportFromCjs(jqueryExports);
      function bind$2(fn, thisArg) {
        return function wrap() {
          return fn.apply(thisArg, arguments);
        };
      }
      const { toString } = Object.prototype;
      const { getPrototypeOf } = Object;
      const kindOf = ((cache2) => (thing) => {
        const str = toString.call(thing);
        return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase());
      })(/* @__PURE__ */ Object.create(null));
      const kindOfTest = (type) => {
        type = type.toLowerCase();
        return (thing) => kindOf(thing) === type;
      };
      const typeOfTest = (type) => (thing) => typeof thing === type;
      const { isArray: isArray$4 } = Array;
      const isUndefined = typeOfTest("undefined");
      function isBuffer$1(val) {
        return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
      }
      const isArrayBuffer = kindOfTest("ArrayBuffer");
      function isArrayBufferView(val) {
        let result;
        if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
          result = ArrayBuffer.isView(val);
        } else {
          result = val && val.buffer && isArrayBuffer(val.buffer);
        }
        return result;
      }
      const isString$1 = typeOfTest("string");
      const isFunction = typeOfTest("function");
      const isNumber$1 = typeOfTest("number");
      const isObject = (thing) => thing !== null && typeof thing === "object";
      const isBoolean$1 = (thing) => thing === true || thing === false;
      const isPlainObject = (val) => {
        if (kindOf(val) !== "object") {
          return false;
        }
        const prototype2 = getPrototypeOf(val);
        return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
      };
      const isDate$1 = kindOfTest("Date");
      const isFile = kindOfTest("File");
      const isBlob = kindOfTest("Blob");
      const isFileList = kindOfTest("FileList");
      const isStream = (val) => isObject(val) && isFunction(val.pipe);
      const isFormData = (thing) => {
        let kind;
        return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
        kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
      };
      const isURLSearchParams = kindOfTest("URLSearchParams");
      const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
      function forEach(obj, fn, { allOwnKeys = false } = {}) {
        if (obj === null || typeof obj === "undefined") {
          return;
        }
        let i;
        let l;
        if (typeof obj !== "object") {
          obj = [obj];
        }
        if (isArray$4(obj)) {
          for (i = 0, l = obj.length; i < l; i++) {
            fn.call(null, obj[i], i, obj);
          }
        } else {
          const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
          const len = keys.length;
          let key;
          for (i = 0; i < len; i++) {
            key = keys[i];
            fn.call(null, obj[key], key, obj);
          }
        }
      }
      function findKey(obj, key) {
        key = key.toLowerCase();
        const keys = Object.keys(obj);
        let i = keys.length;
        let _key;
        while (i-- > 0) {
          _key = keys[i];
          if (key === _key.toLowerCase()) {
            return _key;
          }
        }
        return null;
      }
      const _global = (() => {
        if (typeof globalThis !== "undefined")
          return globalThis;
        return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
      })();
      const isContextDefined = (context) => !isUndefined(context) && context !== _global;
      function merge$1() {
        const { caseless } = isContextDefined(this) && this || {};
        const result = {};
        const assignValue2 = (val, key) => {
          const targetKey = caseless && findKey(result, key) || key;
          if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
            result[targetKey] = merge$1(result[targetKey], val);
          } else if (isPlainObject(val)) {
            result[targetKey] = merge$1({}, val);
          } else if (isArray$4(val)) {
            result[targetKey] = val.slice();
          } else {
            result[targetKey] = val;
          }
        };
        for (let i = 0, l = arguments.length; i < l; i++) {
          arguments[i] && forEach(arguments[i], assignValue2);
        }
        return result;
      }
      const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
        forEach(b, (val, key) => {
          if (thisArg && isFunction(val)) {
            a[key] = bind$2(val, thisArg);
          } else {
            a[key] = val;
          }
        }, { allOwnKeys });
        return a;
      };
      const stripBOM = (content) => {
        if (content.charCodeAt(0) === 65279) {
          content = content.slice(1);
        }
        return content;
      };
      const inherits = (constructor, superConstructor, props, descriptors2) => {
        constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
        constructor.prototype.constructor = constructor;
        Object.defineProperty(constructor, "super", {
          value: superConstructor.prototype
        });
        props && Object.assign(constructor.prototype, props);
      };
      const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
        let props;
        let i;
        let prop;
        const merged = {};
        destObj = destObj || {};
        if (sourceObj == null)
          return destObj;
        do {
          props = Object.getOwnPropertyNames(sourceObj);
          i = props.length;
          while (i-- > 0) {
            prop = props[i];
            if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
              destObj[prop] = sourceObj[prop];
              merged[prop] = true;
            }
          }
          sourceObj = filter !== false && getPrototypeOf(sourceObj);
        } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
        return destObj;
      };
      const endsWith = (str, searchString, position) => {
        str = String(str);
        if (position === void 0 || position > str.length) {
          position = str.length;
        }
        position -= searchString.length;
        const lastIndex = str.indexOf(searchString, position);
        return lastIndex !== -1 && lastIndex === position;
      };
      const toArray = (thing) => {
        if (!thing)
          return null;
        if (isArray$4(thing))
          return thing;
        let i = thing.length;
        if (!isNumber$1(i))
          return null;
        const arr = new Array(i);
        while (i-- > 0) {
          arr[i] = thing[i];
        }
        return arr;
      };
      const isTypedArray = ((TypedArray2) => {
        return (thing) => {
          return TypedArray2 && thing instanceof TypedArray2;
        };
      })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
      const forEachEntry = (obj, fn) => {
        const generator = obj && obj[Symbol.iterator];
        const iterator = generator.call(obj);
        let result;
        while ((result = iterator.next()) && !result.done) {
          const pair = result.value;
          fn.call(obj, pair[0], pair[1]);
        }
      };
      const matchAll = (regExp, str) => {
        let matches;
        const arr = [];
        while ((matches = regExp.exec(str)) !== null) {
          arr.push(matches);
        }
        return arr;
      };
      const isHTMLForm = kindOfTest("HTMLFormElement");
      const toCamelCase = (str) => {
        return str.toLowerCase().replace(
          /[-_\s]([a-z\d])(\w*)/g,
          function replacer(m, p1, p2) {
            return p1.toUpperCase() + p2;
          }
        );
      };
      const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
      const isRegExp$2 = kindOfTest("RegExp");
      const reduceDescriptors = (obj, reducer) => {
        const descriptors2 = Object.getOwnPropertyDescriptors(obj);
        const reducedDescriptors = {};
        forEach(descriptors2, (descriptor, name) => {
          let ret;
          if ((ret = reducer(descriptor, name, obj)) !== false) {
            reducedDescriptors[name] = ret || descriptor;
          }
        });
        Object.defineProperties(obj, reducedDescriptors);
      };
      const freezeMethods = (obj) => {
        reduceDescriptors(obj, (descriptor, name) => {
          if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
            return false;
          }
          const value = obj[name];
          if (!isFunction(value))
            return;
          descriptor.enumerable = false;
          if ("writable" in descriptor) {
            descriptor.writable = false;
            return;
          }
          if (!descriptor.set) {
            descriptor.set = () => {
              throw Error("Can not rewrite read-only method '" + name + "'");
            };
          }
        });
      };
      const toObjectSet = (arrayOrString, delimiter) => {
        const obj = {};
        const define2 = (arr) => {
          arr.forEach((value) => {
            obj[value] = true;
          });
        };
        isArray$4(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
        return obj;
      };
      const noop = () => {
      };
      const toFiniteNumber = (value, defaultValue) => {
        value = +value;
        return Number.isFinite(value) ? value : defaultValue;
      };
      const ALPHA = "abcdefghijklmnopqrstuvwxyz";
      const DIGIT = "0123456789";
      const ALPHABET = {
        DIGIT,
        ALPHA,
        ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
      };
      const generateString = (size2 = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
        let str = "";
        const { length } = alphabet;
        while (size2--) {
          str += alphabet[Math.random() * length | 0];
        }
        return str;
      };
      function isSpecCompliantForm(thing) {
        return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
      }
      const toJSONObject = (obj) => {
        const stack2 = new Array(10);
        const visit = (source, i) => {
          if (isObject(source)) {
            if (stack2.indexOf(source) >= 0) {
              return;
            }
            if (!("toJSON" in source)) {
              stack2[i] = source;
              const target = isArray$4(source) ? [] : {};
              forEach(source, (value, key) => {
                const reducedValue = visit(value, i + 1);
                !isUndefined(reducedValue) && (target[key] = reducedValue);
              });
              stack2[i] = void 0;
              return target;
            }
          }
          return source;
        };
        return visit(obj, 0);
      };
      const isAsyncFn = kindOfTest("AsyncFunction");
      const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
      const utils$4 = {
        isArray: isArray$4,
        isArrayBuffer,
        isBuffer: isBuffer$1,
        isFormData,
        isArrayBufferView,
        isString: isString$1,
        isNumber: isNumber$1,
        isBoolean: isBoolean$1,
        isObject,
        isPlainObject,
        isUndefined,
        isDate: isDate$1,
        isFile,
        isBlob,
        isRegExp: isRegExp$2,
        isFunction,
        isStream,
        isURLSearchParams,
        isTypedArray,
        isFileList,
        forEach,
        merge: merge$1,
        extend,
        trim,
        stripBOM,
        inherits,
        toFlatObject,
        kindOf,
        kindOfTest,
        endsWith,
        toArray,
        forEachEntry,
        matchAll,
        isHTMLForm,
        hasOwnProperty,
        hasOwnProp: hasOwnProperty,
        // an alias to avoid ESLint no-prototype-builtins detection
        reduceDescriptors,
        freezeMethods,
        toObjectSet,
        toCamelCase,
        noop,
        toFiniteNumber,
        findKey,
        global: _global,
        isContextDefined,
        ALPHABET,
        generateString,
        isSpecCompliantForm,
        toJSONObject,
        isAsyncFn,
        isThenable
      };
      function AxiosError(message, code, config, request2, response) {
        Error.call(this);
        if (Error.captureStackTrace) {
          Error.captureStackTrace(this, this.constructor);
        } else {
          this.stack = new Error().stack;
        }
        this.message = message;
        this.name = "AxiosError";
        code && (this.code = code);
        config && (this.config = config);
        request2 && (this.request = request2);
        response && (this.response = response);
      }
      utils$4.inherits(AxiosError, Error, {
        toJSON: function toJSON() {
          return {
            // Standard
            message: this.message,
            name: this.name,
            // Microsoft
            description: this.description,
            number: this.number,
            // Mozilla
            fileName: this.fileName,
            lineNumber: this.lineNumber,
            columnNumber: this.columnNumber,
            stack: this.stack,
            // Axios
            config: utils$4.toJSONObject(this.config),
            code: this.code,
            status: this.response && this.response.status ? this.response.status : null
          };
        }
      });
      const prototype$1 = AxiosError.prototype;
      const descriptors = {};
      [
        "ERR_BAD_OPTION_VALUE",
        "ERR_BAD_OPTION",
        "ECONNABORTED",
        "ETIMEDOUT",
        "ERR_NETWORK",
        "ERR_FR_TOO_MANY_REDIRECTS",
        "ERR_DEPRECATED",
        "ERR_BAD_RESPONSE",
        "ERR_BAD_REQUEST",
        "ERR_CANCELED",
        "ERR_NOT_SUPPORT",
        "ERR_INVALID_URL"
        // eslint-disable-next-line func-names
      ].forEach((code) => {
        descriptors[code] = { value: code };
      });
      Object.defineProperties(AxiosError, descriptors);
      Object.defineProperty(prototype$1, "isAxiosError", { value: true });
      AxiosError.from = (error, code, config, request2, response, customProps) => {
        const axiosError = Object.create(prototype$1);
        utils$4.toFlatObject(error, axiosError, function filter(obj) {
          return obj !== Error.prototype;
        }, (prop) => {
          return prop !== "isAxiosError";
        });
        AxiosError.call(axiosError, error.message, code, config, request2, response);
        axiosError.cause = error;
        axiosError.name = error.name;
        customProps && Object.assign(axiosError, customProps);
        return axiosError;
      };
      const httpAdapter = null;
      function isVisitable(thing) {
        return utils$4.isPlainObject(thing) || utils$4.isArray(thing);
      }
      function removeBrackets(key) {
        return utils$4.endsWith(key, "[]") ? key.slice(0, -2) : key;
      }
      function renderKey(path, key, dots) {
        if (!path)
          return key;
        return path.concat(key).map(function each(token, i) {
          token = removeBrackets(token);
          return !dots && i ? "[" + token + "]" : token;
        }).join(dots ? "." : "");
      }
      function isFlatArray(arr) {
        return utils$4.isArray(arr) && !arr.some(isVisitable);
      }
      const predicates = utils$4.toFlatObject(utils$4, {}, null, function filter(prop) {
        return /^is[A-Z]/.test(prop);
      });
      function toFormData(obj, formData, options) {
        if (!utils$4.isObject(obj)) {
          throw new TypeError("target must be an object");
        }
        formData = formData || new FormData();
        options = utils$4.toFlatObject(options, {
          metaTokens: true,
          dots: false,
          indexes: false
        }, false, function defined(option, source) {
          return !utils$4.isUndefined(source[option]);
        });
        const metaTokens = options.metaTokens;
        const visitor = options.visitor || defaultVisitor;
        const dots = options.dots;
        const indexes = options.indexes;
        const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
        const useBlob = _Blob && utils$4.isSpecCompliantForm(formData);
        if (!utils$4.isFunction(visitor)) {
          throw new TypeError("visitor must be a function");
        }
        function convertValue(value) {
          if (value === null)
            return "";
          if (utils$4.isDate(value)) {
            return value.toISOString();
          }
          if (!useBlob && utils$4.isBlob(value)) {
            throw new AxiosError("Blob is not supported. Use a Buffer instead.");
          }
          if (utils$4.isArrayBuffer(value) || utils$4.isTypedArray(value)) {
            return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
          }
          return value;
        }
        function defaultVisitor(value, key, path) {
          let arr = value;
          if (value && !path && typeof value === "object") {
            if (utils$4.endsWith(key, "{}")) {
              key = metaTokens ? key : key.slice(0, -2);
              value = JSON.stringify(value);
            } else if (utils$4.isArray(value) && isFlatArray(value) || (utils$4.isFileList(value) || utils$4.endsWith(key, "[]")) && (arr = utils$4.toArray(value))) {
              key = removeBrackets(key);
              arr.forEach(function each(el, index) {
                !(utils$4.isUndefined(el) || el === null) && formData.append(
                  // eslint-disable-next-line no-nested-ternary
                  indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
                  convertValue(el)
                );
              });
              return false;
            }
          }
          if (isVisitable(value)) {
            return true;
          }
          formData.append(renderKey(path, key, dots), convertValue(value));
          return false;
        }
        const stack2 = [];
        const exposedHelpers = Object.assign(predicates, {
          defaultVisitor,
          convertValue,
          isVisitable
        });
        function build(value, path) {
          if (utils$4.isUndefined(value))
            return;
          if (stack2.indexOf(value) !== -1) {
            throw Error("Circular reference detected in " + path.join("."));
          }
          stack2.push(value);
          utils$4.forEach(value, function each(el, key) {
            const result = !(utils$4.isUndefined(el) || el === null) && visitor.call(
              formData,
              el,
              utils$4.isString(key) ? key.trim() : key,
              path,
              exposedHelpers
            );
            if (result === true) {
              build(el, path ? path.concat(key) : [key]);
            }
          });
          stack2.pop();
        }
        if (!utils$4.isObject(obj)) {
          throw new TypeError("data must be an object");
        }
        build(obj);
        return formData;
      }
      function encode$2(str) {
        const charMap = {
          "!": "%21",
          "'": "%27",
          "(": "%28",
          ")": "%29",
          "~": "%7E",
          "%20": "+",
          "%00": "\0"
        };
        return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
          return charMap[match];
        });
      }
      function AxiosURLSearchParams(params, options) {
        this._pairs = [];
        params && toFormData(params, this, options);
      }
      const prototype = AxiosURLSearchParams.prototype;
      prototype.append = function append(name, value) {
        this._pairs.push([name, value]);
      };
      prototype.toString = function toString2(encoder) {
        const _encode = encoder ? function(value) {
          return encoder.call(this, value, encode$2);
        } : encode$2;
        return this._pairs.map(function each(pair) {
          return _encode(pair[0]) + "=" + _encode(pair[1]);
        }, "").join("&");
      };
      function encode$1(val) {
        return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
      }
      function buildURL(url, params, options) {
        if (!params) {
          return url;
        }
        const _encode = options && options.encode || encode$1;
        const serializeFn = options && options.serialize;
        let serializedParams;
        if (serializeFn) {
          serializedParams = serializeFn(params, options);
        } else {
          serializedParams = utils$4.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
        }
        if (serializedParams) {
          const hashmarkIndex = url.indexOf("#");
          if (hashmarkIndex !== -1) {
            url = url.slice(0, hashmarkIndex);
          }
          url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
        }
        return url;
      }
      class InterceptorManager {
        constructor() {
          this.handlers = [];
        }
        /**
         * Add a new interceptor to the stack
         *
         * @param {Function} fulfilled The function to handle `then` for a `Promise`
         * @param {Function} rejected The function to handle `reject` for a `Promise`
         *
         * @return {Number} An ID used to remove interceptor later
         */
        use(fulfilled, rejected, options) {
          this.handlers.push({
            fulfilled,
            rejected,
            synchronous: options ? options.synchronous : false,
            runWhen: options ? options.runWhen : null
          });
          return this.handlers.length - 1;
        }
        /**
         * Remove an interceptor from the stack
         *
         * @param {Number} id The ID that was returned by `use`
         *
         * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
         */
        eject(id) {
          if (this.handlers[id]) {
            this.handlers[id] = null;
          }
        }
        /**
         * Clear all interceptors from the stack
         *
         * @returns {void}
         */
        clear() {
          if (this.handlers) {
            this.handlers = [];
          }
        }
        /**
         * Iterate over all the registered interceptors
         *
         * This method is particularly useful for skipping over any
         * interceptors that may have become `null` calling `eject`.
         *
         * @param {Function} fn The function to call for each interceptor
         *
         * @returns {void}
         */
        forEach(fn) {
          utils$4.forEach(this.handlers, function forEachHandler(h2) {
            if (h2 !== null) {
              fn(h2);
            }
          });
        }
      }
      const InterceptorManager$1 = InterceptorManager;
      const transitionalDefaults = {
        silentJSONParsing: true,
        forcedJSONParsing: true,
        clarifyTimeoutError: false
      };
      const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
      const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
      const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
      const platform$1 = {
        isBrowser: true,
        classes: {
          URLSearchParams: URLSearchParams$1,
          FormData: FormData$1,
          Blob: Blob$1
        },
        protocols: ["http", "https", "file", "blob", "url", "data"]
      };
      const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
      const hasStandardBrowserEnv = ((product) => {
        return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
      })(typeof navigator !== "undefined" && navigator.product);
      const hasStandardBrowserWebWorkerEnv = (() => {
        return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
        self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
      })();
      const utils$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
        __proto__: null,
        hasBrowserEnv,
        hasStandardBrowserEnv,
        hasStandardBrowserWebWorkerEnv
      }, Symbol.toStringTag, { value: "Module" }));
      const platform = {
        ...utils$3,
        ...platform$1
      };
      function toURLEncodedForm(data, options) {
        return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
          visitor: function(value, key, path, helpers) {
            if (platform.isNode && utils$4.isBuffer(value)) {
              this.append(key, value.toString("base64"));
              return false;
            }
            return helpers.defaultVisitor.apply(this, arguments);
          }
        }, options));
      }
      function parsePropPath(name) {
        return utils$4.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
          return match[0] === "[]" ? "" : match[1] || match[0];
        });
      }
      function arrayToObject$1(arr) {
        const obj = {};
        const keys = Object.keys(arr);
        let i;
        const len = keys.length;
        let key;
        for (i = 0; i < len; i++) {
          key = keys[i];
          obj[key] = arr[key];
        }
        return obj;
      }
      function formDataToJSON(formData) {
        function buildPath(path, value, target, index) {
          let name = path[index++];
          if (name === "__proto__")
            return true;
          const isNumericKey = Number.isFinite(+name);
          const isLast = index >= path.length;
          name = !name && utils$4.isArray(target) ? target.length : name;
          if (isLast) {
            if (utils$4.hasOwnProp(target, name)) {
              target[name] = [target[name], value];
            } else {
              target[name] = value;
            }
            return !isNumericKey;
          }
          if (!target[name] || !utils$4.isObject(target[name])) {
            target[name] = [];
          }
          const result = buildPath(path, value, target[name], index);
          if (result && utils$4.isArray(target[name])) {
            target[name] = arrayToObject$1(target[name]);
          }
          return !isNumericKey;
        }
        if (utils$4.isFormData(formData) && utils$4.isFunction(formData.entries)) {
          const obj = {};
          utils$4.forEachEntry(formData, (name, value) => {
            buildPath(parsePropPath(name), value, obj, 0);
          });
          return obj;
        }
        return null;
      }
      function stringifySafely(rawValue, parser, encoder) {
        if (utils$4.isString(rawValue)) {
          try {
            (parser || JSON.parse)(rawValue);
            return utils$4.trim(rawValue);
          } catch (e) {
            if (e.name !== "SyntaxError") {
              throw e;
            }
          }
        }
        return (encoder || JSON.stringify)(rawValue);
      }
      const defaults$2 = {
        transitional: transitionalDefaults,
        adapter: ["xhr", "http"],
        transformRequest: [function transformRequest(data, headers) {
          const contentType = headers.getContentType() || "";
          const hasJSONContentType = contentType.indexOf("application/json") > -1;
          const isObjectPayload = utils$4.isObject(data);
          if (isObjectPayload && utils$4.isHTMLForm(data)) {
            data = new FormData(data);
          }
          const isFormData2 = utils$4.isFormData(data);
          if (isFormData2) {
            if (!hasJSONContentType) {
              return data;
            }
            return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
          }
          if (utils$4.isArrayBuffer(data) || utils$4.isBuffer(data) || utils$4.isStream(data) || utils$4.isFile(data) || utils$4.isBlob(data)) {
            return data;
          }
          if (utils$4.isArrayBufferView(data)) {
            return data.buffer;
          }
          if (utils$4.isURLSearchParams(data)) {
            headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
            return data.toString();
          }
          let isFileList2;
          if (isObjectPayload) {
            if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
              return toURLEncodedForm(data, this.formSerializer).toString();
            }
            if ((isFileList2 = utils$4.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
              const _FormData = this.env && this.env.FormData;
              return toFormData(
                isFileList2 ? { "files[]": data } : data,
                _FormData && new _FormData(),
                this.formSerializer
              );
            }
          }
          if (isObjectPayload || hasJSONContentType) {
            headers.setContentType("application/json", false);
            return stringifySafely(data);
          }
          return data;
        }],
        transformResponse: [function transformResponse(data) {
          const transitional = this.transitional || defaults$2.transitional;
          const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
          const JSONRequested = this.responseType === "json";
          if (data && utils$4.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
            const silentJSONParsing = transitional && transitional.silentJSONParsing;
            const strictJSONParsing = !silentJSONParsing && JSONRequested;
            try {
              return JSON.parse(data);
            } catch (e) {
              if (strictJSONParsing) {
                if (e.name === "SyntaxError") {
                  throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
                }
                throw e;
              }
            }
          }
          return data;
        }],
        /**
         * A timeout in milliseconds to abort a request. If set to 0 (default) a
         * timeout is not created.
         */
        timeout: 0,
        xsrfCookieName: "XSRF-TOKEN",
        xsrfHeaderName: "X-XSRF-TOKEN",
        maxContentLength: -1,
        maxBodyLength: -1,
        env: {
          FormData: platform.classes.FormData,
          Blob: platform.classes.Blob
        },
        validateStatus: function validateStatus(status) {
          return status >= 200 && status < 300;
        },
        headers: {
          common: {
            "Accept": "application/json, text/plain, */*",
            "Content-Type": void 0
          }
        }
      };
      utils$4.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
        defaults$2.headers[method] = {};
      });
      const defaults$3 = defaults$2;
      const ignoreDuplicateOf = utils$4.toObjectSet([
        "age",
        "authorization",
        "content-length",
        "content-type",
        "etag",
        "expires",
        "from",
        "host",
        "if-modified-since",
        "if-unmodified-since",
        "last-modified",
        "location",
        "max-forwards",
        "proxy-authorization",
        "referer",
        "retry-after",
        "user-agent"
      ]);
      const parseHeaders = (rawHeaders) => {
        const parsed = {};
        let key;
        let val;
        let i;
        rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
          i = line.indexOf(":");
          key = line.substring(0, i).trim().toLowerCase();
          val = line.substring(i + 1).trim();
          if (!key || parsed[key] && ignoreDuplicateOf[key]) {
            return;
          }
          if (key === "set-cookie") {
            if (parsed[key]) {
              parsed[key].push(val);
            } else {
              parsed[key] = [val];
            }
          } else {
            parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
          }
        });
        return parsed;
      };
      const $internals = Symbol("internals");
      function normalizeHeader(header) {
        return header && String(header).trim().toLowerCase();
      }
      function normalizeValue(value) {
        if (value === false || value == null) {
          return value;
        }
        return utils$4.isArray(value) ? value.map(normalizeValue) : String(value);
      }
      function parseTokens(str) {
        const tokens = /* @__PURE__ */ Object.create(null);
        const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
        let match;
        while (match = tokensRE.exec(str)) {
          tokens[match[1]] = match[2];
        }
        return tokens;
      }
      const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
      function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
        if (utils$4.isFunction(filter)) {
          return filter.call(this, value, header);
        }
        if (isHeaderNameFilter) {
          value = header;
        }
        if (!utils$4.isString(value))
          return;
        if (utils$4.isString(filter)) {
          return value.indexOf(filter) !== -1;
        }
        if (utils$4.isRegExp(filter)) {
          return filter.test(value);
        }
      }
      function formatHeader(header) {
        return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
          return char.toUpperCase() + str;
        });
      }
      function buildAccessors(obj, header) {
        const accessorName = utils$4.toCamelCase(" " + header);
        ["get", "set", "has"].forEach((methodName) => {
          Object.defineProperty(obj, methodName + accessorName, {
            value: function(arg1, arg2, arg3) {
              return this[methodName].call(this, header, arg1, arg2, arg3);
            },
            configurable: true
          });
        });
      }
      class AxiosHeaders {
        constructor(headers) {
          headers && this.set(headers);
        }
        set(header, valueOrRewrite, rewrite) {
          const self2 = this;
          function setHeader(_value, _header, _rewrite) {
            const lHeader = normalizeHeader(_header);
            if (!lHeader) {
              throw new Error("header name must be a non-empty string");
            }
            const key = utils$4.findKey(self2, lHeader);
            if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
              self2[key || _header] = normalizeValue(_value);
            }
          }
          const setHeaders = (headers, _rewrite) => utils$4.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
          if (utils$4.isPlainObject(header) || header instanceof this.constructor) {
            setHeaders(header, valueOrRewrite);
          } else if (utils$4.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
            setHeaders(parseHeaders(header), valueOrRewrite);
          } else {
            header != null && setHeader(valueOrRewrite, header, rewrite);
          }
          return this;
        }
        get(header, parser) {
          header = normalizeHeader(header);
          if (header) {
            const key = utils$4.findKey(this, header);
            if (key) {
              const value = this[key];
              if (!parser) {
                return value;
              }
              if (parser === true) {
                return parseTokens(value);
              }
              if (utils$4.isFunction(parser)) {
                return parser.call(this, value, key);
              }
              if (utils$4.isRegExp(parser)) {
                return parser.exec(value);
              }
              throw new TypeError("parser must be boolean|regexp|function");
            }
          }
        }
        has(header, matcher) {
          header = normalizeHeader(header);
          if (header) {
            const key = utils$4.findKey(this, header);
            return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
          }
          return false;
        }
        delete(header, matcher) {
          const self2 = this;
          let deleted = false;
          function deleteHeader(_header) {
            _header = normalizeHeader(_header);
            if (_header) {
              const key = utils$4.findKey(self2, _header);
              if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
                delete self2[key];
                deleted = true;
              }
            }
          }
          if (utils$4.isArray(header)) {
            header.forEach(deleteHeader);
          } else {
            deleteHeader(header);
          }
          return deleted;
        }
        clear(matcher) {
          const keys = Object.keys(this);
          let i = keys.length;
          let deleted = false;
          while (i--) {
            const key = keys[i];
            if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
              delete this[key];
              deleted = true;
            }
          }
          return deleted;
        }
        normalize(format) {
          const self2 = this;
          const headers = {};
          utils$4.forEach(this, (value, header) => {
            const key = utils$4.findKey(headers, header);
            if (key) {
              self2[key] = normalizeValue(value);
              delete self2[header];
              return;
            }
            const normalized = format ? formatHeader(header) : String(header).trim();
            if (normalized !== header) {
              delete self2[header];
            }
            self2[normalized] = normalizeValue(value);
            headers[normalized] = true;
          });
          return this;
        }
        concat(...targets) {
          return this.constructor.concat(this, ...targets);
        }
        toJSON(asStrings) {
          const obj = /* @__PURE__ */ Object.create(null);
          utils$4.forEach(this, (value, header) => {
            value != null && value !== false && (obj[header] = asStrings && utils$4.isArray(value) ? value.join(", ") : value);
          });
          return obj;
        }
        [Symbol.iterator]() {
          return Object.entries(this.toJSON())[Symbol.iterator]();
        }
        toString() {
          return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
        }
        get [Symbol.toStringTag]() {
          return "AxiosHeaders";
        }
        static from(thing) {
          return thing instanceof this ? thing : new this(thing);
        }
        static concat(first, ...targets) {
          const computed2 = new this(first);
          targets.forEach((target) => computed2.set(target));
          return computed2;
        }
        static accessor(header) {
          const internals = this[$internals] = this[$internals] = {
            accessors: {}
          };
          const accessors = internals.accessors;
          const prototype2 = this.prototype;
          function defineAccessor(_header) {
            const lHeader = normalizeHeader(_header);
            if (!accessors[lHeader]) {
              buildAccessors(prototype2, _header);
              accessors[lHeader] = true;
            }
          }
          utils$4.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
          return this;
        }
      }
      AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
      utils$4.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
        let mapped = key[0].toUpperCase() + key.slice(1);
        return {
          get: () => value,
          set(headerValue) {
            this[mapped] = headerValue;
          }
        };
      });
      utils$4.freezeMethods(AxiosHeaders);
      const AxiosHeaders$1 = AxiosHeaders;
      function transformData(fns, response) {
        const config = this || defaults$3;
        const context = response || config;
        const headers = AxiosHeaders$1.from(context.headers);
        let data = context.data;
        utils$4.forEach(fns, function transform(fn) {
          data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
        });
        headers.normalize();
        return data;
      }
      function isCancel(value) {
        return !!(value && value.__CANCEL__);
      }
      function CanceledError(message, config, request2) {
        AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request2);
        this.name = "CanceledError";
      }
      utils$4.inherits(CanceledError, AxiosError, {
        __CANCEL__: true
      });
      function settle(resolve, reject, response) {
        const validateStatus = response.config.validateStatus;
        if (!response.status || !validateStatus || validateStatus(response.status)) {
          resolve(response);
        } else {
          reject(new AxiosError(
            "Request failed with status code " + response.status,
            [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
            response.config,
            response.request,
            response
          ));
        }
      }
      const cookies = platform.hasStandardBrowserEnv ? (
        // Standard browser envs support document.cookie
        {
          write(name, value, expires, path, domain, secure) {
            const cookie = [name + "=" + encodeURIComponent(value)];
            utils$4.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
            utils$4.isString(path) && cookie.push("path=" + path);
            utils$4.isString(domain) && cookie.push("domain=" + domain);
            secure === true && cookie.push("secure");
            document.cookie = cookie.join("; ");
          },
          read(name) {
            const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
            return match ? decodeURIComponent(match[3]) : null;
          },
          remove(name) {
            this.write(name, "", Date.now() - 864e5);
          }
        }
      ) : (
        // Non-standard browser env (web workers, react-native) lack needed support.
        {
          write() {
          },
          read() {
            return null;
          },
          remove() {
          }
        }
      );
      function isAbsoluteURL(url) {
        return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
      }
      function combineURLs(baseURL, relativeURL) {
        return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
      }
      function buildFullPath(baseURL, requestedURL) {
        if (baseURL && !isAbsoluteURL(requestedURL)) {
          return combineURLs(baseURL, requestedURL);
        }
        return requestedURL;
      }
      const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
        // Standard browser envs have full support of the APIs needed to test
        // whether the request URL is of the same origin as current location.
        function standardBrowserEnv() {
          const msie = /(msie|trident)/i.test(navigator.userAgent);
          const urlParsingNode = document.createElement("a");
          let originURL;
          function resolveURL(url) {
            let href = url;
            if (msie) {
              urlParsingNode.setAttribute("href", href);
              href = urlParsingNode.href;
            }
            urlParsingNode.setAttribute("href", href);
            return {
              href: urlParsingNode.href,
              protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
              host: urlParsingNode.host,
              search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
              hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
              hostname: urlParsingNode.hostname,
              port: urlParsingNode.port,
              pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
            };
          }
          originURL = resolveURL(window.location.href);
          return function isURLSameOrigin2(requestURL) {
            const parsed = utils$4.isString(requestURL) ? resolveURL(requestURL) : requestURL;
            return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
          };
        }()
      ) : (
        // Non standard browser envs (web workers, react-native) lack needed support.
        function nonStandardBrowserEnv() {
          return function isURLSameOrigin2() {
            return true;
          };
        }()
      );
      function parseProtocol(url) {
        const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
        return match && match[1] || "";
      }
      function speedometer(samplesCount, min) {
        samplesCount = samplesCount || 10;
        const bytes = new Array(samplesCount);
        const timestamps = new Array(samplesCount);
        let head = 0;
        let tail = 0;
        let firstSampleTS;
        min = min !== void 0 ? min : 1e3;
        return function push2(chunkLength) {
          const now = Date.now();
          const startedAt = timestamps[tail];
          if (!firstSampleTS) {
            firstSampleTS = now;
          }
          bytes[head] = chunkLength;
          timestamps[head] = now;
          let i = tail;
          let bytesCount = 0;
          while (i !== head) {
            bytesCount += bytes[i++];
            i = i % samplesCount;
          }
          head = (head + 1) % samplesCount;
          if (head === tail) {
            tail = (tail + 1) % samplesCount;
          }
          if (now - firstSampleTS < min) {
            return;
          }
          const passed = startedAt && now - startedAt;
          return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
        };
      }
      function progressEventReducer(listener, isDownloadStream) {
        let bytesNotified = 0;
        const _speedometer = speedometer(50, 250);
        return (e) => {
          const loaded = e.loaded;
          const total = e.lengthComputable ? e.total : void 0;
          const progressBytes = loaded - bytesNotified;
          const rate = _speedometer(progressBytes);
          const inRange = loaded <= total;
          bytesNotified = loaded;
          const data = {
            loaded,
            total,
            progress: total ? loaded / total : void 0,
            bytes: progressBytes,
            rate: rate ? rate : void 0,
            estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
            event: e
          };
          data[isDownloadStream ? "download" : "upload"] = true;
          listener(data);
        };
      }
      const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
      const xhrAdapter = isXHRAdapterSupported && function(config) {
        return new Promise(function dispatchXhrRequest(resolve, reject) {
          let requestData = config.data;
          const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
          let { responseType, withXSRFToken } = config;
          let onCanceled;
          function done() {
            if (config.cancelToken) {
              config.cancelToken.unsubscribe(onCanceled);
            }
            if (config.signal) {
              config.signal.removeEventListener("abort", onCanceled);
            }
          }
          let contentType;
          if (utils$4.isFormData(requestData)) {
            if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
              requestHeaders.setContentType(false);
            } else if ((contentType = requestHeaders.getContentType()) !== false) {
              const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
              requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
            }
          }
          let request2 = new XMLHttpRequest();
          if (config.auth) {
            const username = config.auth.username || "";
            const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
            requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
          }
          const fullPath = buildFullPath(config.baseURL, config.url);
          request2.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
          request2.timeout = config.timeout;
          function onloadend() {
            if (!request2) {
              return;
            }
            const responseHeaders = AxiosHeaders$1.from(
              "getAllResponseHeaders" in request2 && request2.getAllResponseHeaders()
            );
            const responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response;
            const response = {
              data: responseData,
              status: request2.status,
              statusText: request2.statusText,
              headers: responseHeaders,
              config,
              request: request2
            };
            settle(function _resolve(value) {
              resolve(value);
              done();
            }, function _reject(err) {
              reject(err);
              done();
            }, response);
            request2 = null;
          }
          if ("onloadend" in request2) {
            request2.onloadend = onloadend;
          } else {
            request2.onreadystatechange = function handleLoad() {
              if (!request2 || request2.readyState !== 4) {
                return;
              }
              if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) {
                return;
              }
              setTimeout(onloadend);
            };
          }
          request2.onabort = function handleAbort() {
            if (!request2) {
              return;
            }
            reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request2));
            request2 = null;
          };
          request2.onerror = function handleError() {
            reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request2));
            request2 = null;
          };
          request2.ontimeout = function handleTimeout() {
            let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
            const transitional = config.transitional || transitionalDefaults;
            if (config.timeoutErrorMessage) {
              timeoutErrorMessage = config.timeoutErrorMessage;
            }
            reject(new AxiosError(
              timeoutErrorMessage,
              transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
              config,
              request2
            ));
            request2 = null;
          };
          if (platform.hasStandardBrowserEnv) {
            withXSRFToken && utils$4.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
            if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
              const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
              if (xsrfValue) {
                requestHeaders.set(config.xsrfHeaderName, xsrfValue);
              }
            }
          }
          requestData === void 0 && requestHeaders.setContentType(null);
          if ("setRequestHeader" in request2) {
            utils$4.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
              request2.setRequestHeader(key, val);
            });
          }
          if (!utils$4.isUndefined(config.withCredentials)) {
            request2.withCredentials = !!config.withCredentials;
          }
          if (responseType && responseType !== "json") {
            request2.responseType = config.responseType;
          }
          if (typeof config.onDownloadProgress === "function") {
            request2.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
          }
          if (typeof config.onUploadProgress === "function" && request2.upload) {
            request2.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
          }
          if (config.cancelToken || config.signal) {
            onCanceled = (cancel) => {
              if (!request2) {
                return;
              }
              reject(!cancel || cancel.type ? new CanceledError(null, config, request2) : cancel);
              request2.abort();
              request2 = null;
            };
            config.cancelToken && config.cancelToken.subscribe(onCanceled);
            if (config.signal) {
              config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
            }
          }
          const protocol = parseProtocol(fullPath);
          if (protocol && platform.protocols.indexOf(protocol) === -1) {
            reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
            return;
          }
          request2.send(requestData || null);
        });
      };
      const knownAdapters = {
        http: httpAdapter,
        xhr: xhrAdapter
      };
      utils$4.forEach(knownAdapters, (fn, value) => {
        if (fn) {
          try {
            Object.defineProperty(fn, "name", { value });
          } catch (e) {
          }
          Object.defineProperty(fn, "adapterName", { value });
        }
      });
      const renderReason = (reason) => `- ${reason}`;
      const isResolvedHandle = (adapter) => utils$4.isFunction(adapter) || adapter === null || adapter === false;
      const adapters = {
        getAdapter: (adapters2) => {
          adapters2 = utils$4.isArray(adapters2) ? adapters2 : [adapters2];
          const { length } = adapters2;
          let nameOrAdapter;
          let adapter;
          const rejectedReasons = {};
          for (let i = 0; i < length; i++) {
            nameOrAdapter = adapters2[i];
            let id;
            adapter = nameOrAdapter;
            if (!isResolvedHandle(nameOrAdapter)) {
              adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
              if (adapter === void 0) {
                throw new AxiosError(`Unknown adapter '${id}'`);
              }
            }
            if (adapter) {
              break;
            }
            rejectedReasons[id || "#" + i] = adapter;
          }
          if (!adapter) {
            const reasons = Object.entries(rejectedReasons).map(
              ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
            );
            let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
            throw new AxiosError(
              `There is no suitable adapter to dispatch the request ` + s,
              "ERR_NOT_SUPPORT"
            );
          }
          return adapter;
        },
        adapters: knownAdapters
      };
      function throwIfCancellationRequested(config) {
        if (config.cancelToken) {
          config.cancelToken.throwIfRequested();
        }
        if (config.signal && config.signal.aborted) {
          throw new CanceledError(null, config);
        }
      }
      function dispatchRequest(config) {
        throwIfCancellationRequested(config);
        config.headers = AxiosHeaders$1.from(config.headers);
        config.data = transformData.call(
          config,
          config.transformRequest
        );
        if (["post", "put", "patch"].indexOf(config.method) !== -1) {
          config.headers.setContentType("application/x-www-form-urlencoded", false);
        }
        const adapter = adapters.getAdapter(config.adapter || defaults$3.adapter);
        return adapter(config).then(function onAdapterResolution(response) {
          throwIfCancellationRequested(config);
          response.data = transformData.call(
            config,
            config.transformResponse,
            response
          );
          response.headers = AxiosHeaders$1.from(response.headers);
          return response;
        }, function onAdapterRejection(reason) {
          if (!isCancel(reason)) {
            throwIfCancellationRequested(config);
            if (reason && reason.response) {
              reason.response.data = transformData.call(
                config,
                config.transformResponse,
                reason.response
              );
              reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
            }
          }
          return Promise.reject(reason);
        });
      }
      const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
      function mergeConfig(config1, config2) {
        config2 = config2 || {};
        const config = {};
        function getMergedValue(target, source, caseless) {
          if (utils$4.isPlainObject(target) && utils$4.isPlainObject(source)) {
            return utils$4.merge.call({ caseless }, target, source);
          } else if (utils$4.isPlainObject(source)) {
            return utils$4.merge({}, source);
          } else if (utils$4.isArray(source)) {
            return source.slice();
          }
          return source;
        }
        function mergeDeepProperties(a, b, caseless) {
          if (!utils$4.isUndefined(b)) {
            return getMergedValue(a, b, caseless);
          } else if (!utils$4.isUndefined(a)) {
            return getMergedValue(void 0, a, caseless);
          }
        }
        function valueFromConfig2(a, b) {
          if (!utils$4.isUndefined(b)) {
            return getMergedValue(void 0, b);
          }
        }
        function defaultToConfig2(a, b) {
          if (!utils$4.isUndefined(b)) {
            return getMergedValue(void 0, b);
          } else if (!utils$4.isUndefined(a)) {
            return getMergedValue(void 0, a);
          }
        }
        function mergeDirectKeys(a, b, prop) {
          if (prop in config2) {
            return getMergedValue(a, b);
          } else if (prop in config1) {
            return getMergedValue(void 0, a);
          }
        }
        const mergeMap = {
          url: valueFromConfig2,
          method: valueFromConfig2,
          data: valueFromConfig2,
          baseURL: defaultToConfig2,
          transformRequest: defaultToConfig2,
          transformResponse: defaultToConfig2,
          paramsSerializer: defaultToConfig2,
          timeout: defaultToConfig2,
          timeoutMessage: defaultToConfig2,
          withCredentials: defaultToConfig2,
          withXSRFToken: defaultToConfig2,
          adapter: defaultToConfig2,
          responseType: defaultToConfig2,
          xsrfCookieName: defaultToConfig2,
          xsrfHeaderName: defaultToConfig2,
          onUploadProgress: defaultToConfig2,
          onDownloadProgress: defaultToConfig2,
          decompress: defaultToConfig2,
          maxContentLength: defaultToConfig2,
          maxBodyLength: defaultToConfig2,
          beforeRedirect: defaultToConfig2,
          transport: defaultToConfig2,
          httpAgent: defaultToConfig2,
          httpsAgent: defaultToConfig2,
          cancelToken: defaultToConfig2,
          socketPath: defaultToConfig2,
          responseEncoding: defaultToConfig2,
          validateStatus: mergeDirectKeys,
          headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
        };
        utils$4.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
          const merge2 = mergeMap[prop] || mergeDeepProperties;
          const configValue = merge2(config1[prop], config2[prop], prop);
          utils$4.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
        });
        return config;
      }
      const VERSION = "1.6.5";
      const validators$1 = {};
      ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
        validators$1[type] = function validator2(thing) {
          return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
        };
      });
      const deprecatedWarnings = {};
      validators$1.transitional = function transitional(validator2, version, message) {
        function formatMessage(opt, desc) {
          return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
        }
        return (value, opt, opts) => {
          if (validator2 === false) {
            throw new AxiosError(
              formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
              AxiosError.ERR_DEPRECATED
            );
          }
          if (version && !deprecatedWarnings[opt]) {
            deprecatedWarnings[opt] = true;
            console.warn(
              formatMessage(
                opt,
                " has been deprecated since v" + version + " and will be removed in the near future"
              )
            );
          }
          return validator2 ? validator2(value, opt, opts) : true;
        };
      };
      function assertOptions(options, schema, allowUnknown) {
        if (typeof options !== "object") {
          throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
        }
        const keys = Object.keys(options);
        let i = keys.length;
        while (i-- > 0) {
          const opt = keys[i];
          const validator2 = schema[opt];
          if (validator2) {
            const value = options[opt];
            const result = value === void 0 || validator2(value, opt, options);
            if (result !== true) {
              throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
            }
            continue;
          }
          if (allowUnknown !== true) {
            throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
          }
        }
      }
      const validator = {
        assertOptions,
        validators: validators$1
      };
      const validators = validator.validators;
      class Axios {
        constructor(instanceConfig) {
          this.defaults = instanceConfig;
          this.interceptors = {
            request: new InterceptorManager$1(),
            response: new InterceptorManager$1()
          };
        }
        /**
         * Dispatch a request
         *
         * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
         * @param {?Object} config
         *
         * @returns {Promise} The Promise to be fulfilled
         */
        request(configOrUrl, config) {
          if (typeof configOrUrl === "string") {
            config = config || {};
            config.url = configOrUrl;
          } else {
            config = configOrUrl || {};
          }
          config = mergeConfig(this.defaults, config);
          const { transitional, paramsSerializer, headers } = config;
          if (transitional !== void 0) {
            validator.assertOptions(transitional, {
              silentJSONParsing: validators.transitional(validators.boolean),
              forcedJSONParsing: validators.transitional(validators.boolean),
              clarifyTimeoutError: validators.transitional(validators.boolean)
            }, false);
          }
          if (paramsSerializer != null) {
            if (utils$4.isFunction(paramsSerializer)) {
              config.paramsSerializer = {
                serialize: paramsSerializer
              };
            } else {
              validator.assertOptions(paramsSerializer, {
                encode: validators.function,
                serialize: validators.function
              }, true);
            }
          }
          config.method = (config.method || this.defaults.method || "get").toLowerCase();
          let contextHeaders = headers && utils$4.merge(
            headers.common,
            headers[config.method]
          );
          headers && utils$4.forEach(
            ["delete", "get", "head", "post", "put", "patch", "common"],
            (method) => {
              delete headers[method];
            }
          );
          config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
          const requestInterceptorChain = [];
          let synchronousRequestInterceptors = true;
          this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
            if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
              return;
            }
            synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
            requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
          });
          const responseInterceptorChain = [];
          this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
            responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
          });
          let promise;
          let i = 0;
          let len;
          if (!synchronousRequestInterceptors) {
            const chain = [dispatchRequest.bind(this), void 0];
            chain.unshift.apply(chain, requestInterceptorChain);
            chain.push.apply(chain, responseInterceptorChain);
            len = chain.length;
            promise = Promise.resolve(config);
            while (i < len) {
              promise = promise.then(chain[i++], chain[i++]);
            }
            return promise;
          }
          len = requestInterceptorChain.length;
          let newConfig = config;
          i = 0;
          while (i < len) {
            const onFulfilled = requestInterceptorChain[i++];
            const onRejected = requestInterceptorChain[i++];
            try {
              newConfig = onFulfilled(newConfig);
            } catch (error) {
              onRejected.call(this, error);
              break;
            }
          }
          try {
            promise = dispatchRequest.call(this, newConfig);
          } catch (error) {
            return Promise.reject(error);
          }
          i = 0;
          len = responseInterceptorChain.length;
          while (i < len) {
            promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
          }
          return promise;
        }
        getUri(config) {
          config = mergeConfig(this.defaults, config);
          const fullPath = buildFullPath(config.baseURL, config.url);
          return buildURL(fullPath, config.params, config.paramsSerializer);
        }
      }
      utils$4.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
        Axios.prototype[method] = function(url, config) {
          return this.request(mergeConfig(config || {}, {
            method,
            url,
            data: (config || {}).data
          }));
        };
      });
      utils$4.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
        function generateHTTPMethod(isForm) {
          return function httpMethod(url, data, config) {
            return this.request(mergeConfig(config || {}, {
              method,
              headers: isForm ? {
                "Content-Type": "multipart/form-data"
              } : {},
              url,
              data
            }));
          };
        }
        Axios.prototype[method] = generateHTTPMethod();
        Axios.prototype[method + "Form"] = generateHTTPMethod(true);
      });
      const Axios$1 = Axios;
      class CancelToken {
        constructor(executor) {
          if (typeof executor !== "function") {
            throw new TypeError("executor must be a function.");
          }
          let resolvePromise;
          this.promise = new Promise(function promiseExecutor(resolve) {
            resolvePromise = resolve;
          });
          const token = this;
          this.promise.then((cancel) => {
            if (!token._listeners)
              return;
            let i = token._listeners.length;
            while (i-- > 0) {
              token._listeners[i](cancel);
            }
            token._listeners = null;
          });
          this.promise.then = (onfulfilled) => {
            let _resolve;
            const promise = new Promise((resolve) => {
              token.subscribe(resolve);
              _resolve = resolve;
            }).then(onfulfilled);
            promise.cancel = function reject() {
              token.unsubscribe(_resolve);
            };
            return promise;
          };
          executor(function cancel(message, config, request2) {
            if (token.reason) {
              return;
            }
            token.reason = new CanceledError(message, config, request2);
            resolvePromise(token.reason);
          });
        }
        /**
         * Throws a `CanceledError` if cancellation has been requested.
         */
        throwIfRequested() {
          if (this.reason) {
            throw this.reason;
          }
        }
        /**
         * Subscribe to the cancel signal
         */
        subscribe(listener) {
          if (this.reason) {
            listener(this.reason);
            return;
          }
          if (this._listeners) {
            this._listeners.push(listener);
          } else {
            this._listeners = [listener];
          }
        }
        /**
         * Unsubscribe from the cancel signal
         */
        unsubscribe(listener) {
          if (!this._listeners) {
            return;
          }
          const index = this._listeners.indexOf(listener);
          if (index !== -1) {
            this._listeners.splice(index, 1);
          }
        }
        /**
         * Returns an object that contains a new `CancelToken` and a function that, when called,
         * cancels the `CancelToken`.
         */
        static source() {
          let cancel;
          const token = new CancelToken(function executor(c2) {
            cancel = c2;
          });
          return {
            token,
            cancel
          };
        }
      }
      const CancelToken$1 = CancelToken;
      function spread(callback) {
        return function wrap(arr) {
          return callback.apply(null, arr);
        };
      }
      function isAxiosError(payload) {
        return utils$4.isObject(payload) && payload.isAxiosError === true;
      }
      const HttpStatusCode = {
        Continue: 100,
        SwitchingProtocols: 101,
        Processing: 102,
        EarlyHints: 103,
        Ok: 200,
        Created: 201,
        Accepted: 202,
        NonAuthoritativeInformation: 203,
        NoContent: 204,
        ResetContent: 205,
        PartialContent: 206,
        MultiStatus: 207,
        AlreadyReported: 208,
        ImUsed: 226,
        MultipleChoices: 300,
        MovedPermanently: 301,
        Found: 302,
        SeeOther: 303,
        NotModified: 304,
        UseProxy: 305,
        Unused: 306,
        TemporaryRedirect: 307,
        PermanentRedirect: 308,
        BadRequest: 400,
        Unauthorized: 401,
        PaymentRequired: 402,
        Forbidden: 403,
        NotFound: 404,
        MethodNotAllowed: 405,
        NotAcceptable: 406,
        ProxyAuthenticationRequired: 407,
        RequestTimeout: 408,
        Conflict: 409,
        Gone: 410,
        LengthRequired: 411,
        PreconditionFailed: 412,
        PayloadTooLarge: 413,
        UriTooLong: 414,
        UnsupportedMediaType: 415,
        RangeNotSatisfiable: 416,
        ExpectationFailed: 417,
        ImATeapot: 418,
        MisdirectedRequest: 421,
        UnprocessableEntity: 422,
        Locked: 423,
        FailedDependency: 424,
        TooEarly: 425,
        UpgradeRequired: 426,
        PreconditionRequired: 428,
        TooManyRequests: 429,
        RequestHeaderFieldsTooLarge: 431,
        UnavailableForLegalReasons: 451,
        InternalServerError: 500,
        NotImplemented: 501,
        BadGateway: 502,
        ServiceUnavailable: 503,
        GatewayTimeout: 504,
        HttpVersionNotSupported: 505,
        VariantAlsoNegotiates: 506,
        InsufficientStorage: 507,
        LoopDetected: 508,
        NotExtended: 510,
        NetworkAuthenticationRequired: 511
      };
      Object.entries(HttpStatusCode).forEach(([key, value]) => {
        HttpStatusCode[value] = key;
      });
      const HttpStatusCode$1 = HttpStatusCode;
      function createInstance(defaultConfig) {
        const context = new Axios$1(defaultConfig);
        const instance = bind$2(Axios$1.prototype.request, context);
        utils$4.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
        utils$4.extend(instance, context, null, { allOwnKeys: true });
        instance.create = function create(instanceConfig) {
          return createInstance(mergeConfig(defaultConfig, instanceConfig));
        };
        return instance;
      }
      const axios = createInstance(defaults$3);
      axios.Axios = Axios$1;
      axios.CanceledError = CanceledError;
      axios.CancelToken = CancelToken$1;
      axios.isCancel = isCancel;
      axios.VERSION = VERSION;
      axios.toFormData = toFormData;
      axios.AxiosError = AxiosError;
      axios.Cancel = axios.CanceledError;
      axios.all = function all(promises) {
        return Promise.all(promises);
      };
      axios.spread = spread;
      axios.isAxiosError = isAxiosError;
      axios.mergeConfig = mergeConfig;
      axios.AxiosHeaders = AxiosHeaders$1;
      axios.formToJSON = (thing) => formDataToJSON(utils$4.isHTMLForm(thing) ? new FormData(thing) : thing);
      axios.getAdapter = adapters.getAdapter;
      axios.HttpStatusCode = HttpStatusCode$1;
      axios.default = axios;
      const axios$1 = axios;
      /*! js-cookie v3.0.5 | MIT */
      function assign$1(target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];
          for (var key in source) {
            target[key] = source[key];
          }
        }
        return target;
      }
      var defaultConverter = {
        read: function(value) {
          if (value[0] === '"') {
            value = value.slice(1, -1);
          }
          return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
        },
        write: function(value) {
          return encodeURIComponent(value).replace(
            /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
            decodeURIComponent
          );
        }
      };
      function init(converter, defaultAttributes) {
        function set(name, value, attributes) {
          if (typeof document === "undefined") {
            return;
          }
          attributes = assign$1({}, defaultAttributes, attributes);
          if (typeof attributes.expires === "number") {
            attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
          }
          if (attributes.expires) {
            attributes.expires = attributes.expires.toUTCString();
          }
          name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
          var stringifiedAttributes = "";
          for (var attributeName in attributes) {
            if (!attributes[attributeName]) {
              continue;
            }
            stringifiedAttributes += "; " + attributeName;
            if (attributes[attributeName] === true) {
              continue;
            }
            stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
          }
          return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes;
        }
        function get(name) {
          if (typeof document === "undefined" || arguments.length && !name) {
            return;
          }
          var cookies2 = document.cookie ? document.cookie.split("; ") : [];
          var jar = {};
          for (var i = 0; i < cookies2.length; i++) {
            var parts = cookies2[i].split("=");
            var value = parts.slice(1).join("=");
            try {
              var found = decodeURIComponent(parts[0]);
              jar[found] = converter.read(value, found);
              if (name === found) {
                break;
              }
            } catch (e) {
            }
          }
          return name ? jar[name] : jar;
        }
        return Object.create(
          {
            set,
            get,
            remove: function(name, attributes) {
              set(
                name,
                "",
                assign$1({}, attributes, {
                  expires: -1
                })
              );
            },
            withAttributes: function(attributes) {
              return init(this.converter, assign$1({}, this.attributes, attributes));
            },
            withConverter: function(converter2) {
              return init(assign$1({}, this.converter, converter2), this.attributes);
            }
          },
          {
            attributes: { value: Object.freeze(defaultAttributes) },
            converter: { value: Object.freeze(converter) }
          }
        );
      }
      var api = init(defaultConverter, { path: "/" });
      var shams = function hasSymbols2() {
        if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
          return false;
        }
        if (typeof Symbol.iterator === "symbol") {
          return true;
        }
        var obj = {};
        var sym = Symbol("test");
        var symObj = Object(sym);
        if (typeof sym === "string") {
          return false;
        }
        if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
          return false;
        }
        if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
          return false;
        }
        var symVal = 42;
        obj[sym] = symVal;
        for (sym in obj) {
          return false;
        }
        if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
          return false;
        }
        if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
          return false;
        }
        var syms = Object.getOwnPropertySymbols(obj);
        if (syms.length !== 1 || syms[0] !== sym) {
          return false;
        }
        if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
          return false;
        }
        if (typeof Object.getOwnPropertyDescriptor === "function") {
          var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
          if (descriptor.value !== symVal || descriptor.enumerable !== true) {
            return false;
          }
        }
        return true;
      };
      var origSymbol = typeof Symbol !== "undefined" && Symbol;
      var hasSymbolSham = shams;
      var hasSymbols$1 = function hasNativeSymbols() {
        if (typeof origSymbol !== "function") {
          return false;
        }
        if (typeof Symbol !== "function") {
          return false;
        }
        if (typeof origSymbol("foo") !== "symbol") {
          return false;
        }
        if (typeof Symbol("bar") !== "symbol") {
          return false;
        }
        return hasSymbolSham();
      };
      var test = {
        foo: {}
      };
      var $Object = Object;
      var hasProto$1 = function hasProto2() {
        return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
      };
      var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
      var toStr$1 = Object.prototype.toString;
      var max = Math.max;
      var funcType = "[object Function]";
      var concatty = function concatty2(a, b) {
        var arr = [];
        for (var i = 0; i < a.length; i += 1) {
          arr[i] = a[i];
        }
        for (var j = 0; j < b.length; j += 1) {
          arr[j + a.length] = b[j];
        }
        return arr;
      };
      var slicy = function slicy2(arrLike, offset) {
        var arr = [];
        for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
          arr[j] = arrLike[i];
        }
        return arr;
      };
      var joiny = function(arr, joiner) {
        var str = "";
        for (var i = 0; i < arr.length; i += 1) {
          str += arr[i];
          if (i + 1 < arr.length) {
            str += joiner;
          }
        }
        return str;
      };
      var implementation$1 = function bind2(that) {
        var target = this;
        if (typeof target !== "function" || toStr$1.apply(target) !== funcType) {
          throw new TypeError(ERROR_MESSAGE + target);
        }
        var args = slicy(arguments, 1);
        var bound;
        var binder = function() {
          if (this instanceof bound) {
            var result = target.apply(
              this,
              concatty(args, arguments)
            );
            if (Object(result) === result) {
              return result;
            }
            return this;
          }
          return target.apply(
            that,
            concatty(args, arguments)
          );
        };
        var boundLength = max(0, target.length - args.length);
        var boundArgs = [];
        for (var i = 0; i < boundLength; i++) {
          boundArgs[i] = "$" + i;
        }
        bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
        if (target.prototype) {
          var Empty = function Empty2() {
          };
          Empty.prototype = target.prototype;
          bound.prototype = new Empty();
          Empty.prototype = null;
        }
        return bound;
      };
      var implementation = implementation$1;
      var functionBind = Function.prototype.bind || implementation;
      var call = Function.prototype.call;
      var $hasOwn = Object.prototype.hasOwnProperty;
      var bind$1 = functionBind;
      var hasown = bind$1.call(call, $hasOwn);
      var undefined$1;
      var $SyntaxError$1 = SyntaxError;
      var $Function = Function;
      var $TypeError$3 = TypeError;
      var getEvalledConstructor = function(expressionSyntax) {
        try {
          return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
        } catch (e) {
        }
      };
      var $gOPD$1 = Object.getOwnPropertyDescriptor;
      if ($gOPD$1) {
        try {
          $gOPD$1({}, "");
        } catch (e) {
          $gOPD$1 = null;
        }
      }
      var throwTypeError = function() {
        throw new $TypeError$3();
      };
      var ThrowTypeError = $gOPD$1 ? function() {
        try {
          arguments.callee;
          return throwTypeError;
        } catch (calleeThrows) {
          try {
            return $gOPD$1(arguments, "callee").get;
          } catch (gOPDthrows) {
            return throwTypeError;
          }
        }
      }() : throwTypeError;
      var hasSymbols = hasSymbols$1();
      var hasProto = hasProto$1();
      var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
        return x.__proto__;
      } : null);
      var needsEval = {};
      var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
      var INTRINSICS = {
        "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
        "%Array%": Array,
        "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
        "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
        "%AsyncFromSyncIteratorPrototype%": undefined$1,
        "%AsyncFunction%": needsEval,
        "%AsyncGenerator%": needsEval,
        "%AsyncGeneratorFunction%": needsEval,
        "%AsyncIteratorPrototype%": needsEval,
        "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
        "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
        "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
        "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
        "%Boolean%": Boolean,
        "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
        "%Date%": Date,
        "%decodeURI%": decodeURI,
        "%decodeURIComponent%": decodeURIComponent,
        "%encodeURI%": encodeURI,
        "%encodeURIComponent%": encodeURIComponent,
        "%Error%": Error,
        "%eval%": eval,
        // eslint-disable-line no-eval
        "%EvalError%": EvalError,
        "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
        "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
        "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
        "%Function%": $Function,
        "%GeneratorFunction%": needsEval,
        "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
        "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
        "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
        "%isFinite%": isFinite,
        "%isNaN%": isNaN,
        "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
        "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
        "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
        "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
        "%Math%": Math,
        "%Number%": Number,
        "%Object%": Object,
        "%parseFloat%": parseFloat,
        "%parseInt%": parseInt,
        "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
        "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
        "%RangeError%": RangeError,
        "%ReferenceError%": ReferenceError,
        "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
        "%RegExp%": RegExp,
        "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
        "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
        "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
        "%String%": String,
        "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined$1,
        "%Symbol%": hasSymbols ? Symbol : undefined$1,
        "%SyntaxError%": $SyntaxError$1,
        "%ThrowTypeError%": ThrowTypeError,
        "%TypedArray%": TypedArray,
        "%TypeError%": $TypeError$3,
        "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
        "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
        "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
        "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
        "%URIError%": URIError,
        "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
        "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
        "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet
      };
      if (getProto) {
        try {
          null.error;
        } catch (e) {
          var errorProto = getProto(getProto(e));
          INTRINSICS["%Error.prototype%"] = errorProto;
        }
      }
      var doEval = function doEval2(name) {
        var value;
        if (name === "%AsyncFunction%") {
          value = getEvalledConstructor("async function () {}");
        } else if (name === "%GeneratorFunction%") {
          value = getEvalledConstructor("function* () {}");
        } else if (name === "%AsyncGeneratorFunction%") {
          value = getEvalledConstructor("async function* () {}");
        } else if (name === "%AsyncGenerator%") {
          var fn = doEval2("%AsyncGeneratorFunction%");
          if (fn) {
            value = fn.prototype;
          }
        } else if (name === "%AsyncIteratorPrototype%") {
          var gen = doEval2("%AsyncGenerator%");
          if (gen && getProto) {
            value = getProto(gen.prototype);
          }
        }
        INTRINSICS[name] = value;
        return value;
      };
      var LEGACY_ALIASES = {
        "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
        "%ArrayPrototype%": ["Array", "prototype"],
        "%ArrayProto_entries%": ["Array", "prototype", "entries"],
        "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
        "%ArrayProto_keys%": ["Array", "prototype", "keys"],
        "%ArrayProto_values%": ["Array", "prototype", "values"],
        "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
        "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
        "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
        "%BooleanPrototype%": ["Boolean", "prototype"],
        "%DataViewPrototype%": ["DataView", "prototype"],
        "%DatePrototype%": ["Date", "prototype"],
        "%ErrorPrototype%": ["Error", "prototype"],
        "%EvalErrorPrototype%": ["EvalError", "prototype"],
        "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
        "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
        "%FunctionPrototype%": ["Function", "prototype"],
        "%Generator%": ["GeneratorFunction", "prototype"],
        "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
        "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
        "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
        "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
        "%JSONParse%": ["JSON", "parse"],
        "%JSONStringify%": ["JSON", "stringify"],
        "%MapPrototype%": ["Map", "prototype"],
        "%NumberPrototype%": ["Number", "prototype"],
        "%ObjectPrototype%": ["Object", "prototype"],
        "%ObjProto_toString%": ["Object", "prototype", "toString"],
        "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
        "%PromisePrototype%": ["Promise", "prototype"],
        "%PromiseProto_then%": ["Promise", "prototype", "then"],
        "%Promise_all%": ["Promise", "all"],
        "%Promise_reject%": ["Promise", "reject"],
        "%Promise_resolve%": ["Promise", "resolve"],
        "%RangeErrorPrototype%": ["RangeError", "prototype"],
        "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
        "%RegExpPrototype%": ["RegExp", "prototype"],
        "%SetPrototype%": ["Set", "prototype"],
        "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
        "%StringPrototype%": ["String", "prototype"],
        "%SymbolPrototype%": ["Symbol", "prototype"],
        "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
        "%TypedArrayPrototype%": ["TypedArray", "prototype"],
        "%TypeErrorPrototype%": ["TypeError", "prototype"],
        "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
        "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
        "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
        "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
        "%URIErrorPrototype%": ["URIError", "prototype"],
        "%WeakMapPrototype%": ["WeakMap", "prototype"],
        "%WeakSetPrototype%": ["WeakSet", "prototype"]
      };
      var bind = functionBind;
      var hasOwn$1 = hasown;
      var $concat$1 = bind.call(Function.call, Array.prototype.concat);
      var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
      var $replace$1 = bind.call(Function.call, String.prototype.replace);
      var $strSlice = bind.call(Function.call, String.prototype.slice);
      var $exec = bind.call(Function.call, RegExp.prototype.exec);
      var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
      var reEscapeChar = /\\(\\)?/g;
      var stringToPath = function stringToPath2(string) {
        var first = $strSlice(string, 0, 1);
        var last = $strSlice(string, -1);
        if (first === "%" && last !== "%") {
          throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");
        } else if (last === "%" && first !== "%") {
          throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");
        }
        var result = [];
        $replace$1(string, rePropName, function(match, number, quote2, subString) {
          result[result.length] = quote2 ? $replace$1(subString, reEscapeChar, "$1") : number || match;
        });
        return result;
      };
      var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
        var intrinsicName = name;
        var alias;
        if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
          alias = LEGACY_ALIASES[intrinsicName];
          intrinsicName = "%" + alias[0] + "%";
        }
        if (hasOwn$1(INTRINSICS, intrinsicName)) {
          var value = INTRINSICS[intrinsicName];
          if (value === needsEval) {
            value = doEval(intrinsicName);
          }
          if (typeof value === "undefined" && !allowMissing) {
            throw new $TypeError$3("intrinsic " + name + " exists, but is not available. Please file an issue!");
          }
          return {
            alias,
            name: intrinsicName,
            value
          };
        }
        throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
      };
      var getIntrinsic = function GetIntrinsic2(name, allowMissing) {
        if (typeof name !== "string" || name.length === 0) {
          throw new $TypeError$3("intrinsic name must be a non-empty string");
        }
        if (arguments.length > 1 && typeof allowMissing !== "boolean") {
          throw new $TypeError$3('"allowMissing" argument must be a boolean');
        }
        if ($exec(/^%?[^%]*%?$/, name) === null) {
          throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
        }
        var parts = stringToPath(name);
        var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
        var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
        var intrinsicRealName = intrinsic.name;
        var value = intrinsic.value;
        var skipFurtherCaching = false;
        var alias = intrinsic.alias;
        if (alias) {
          intrinsicBaseName = alias[0];
          $spliceApply(parts, $concat$1([0, 1], alias));
        }
        for (var i = 1, isOwn = true; i < parts.length; i += 1) {
          var part = parts[i];
          var first = $strSlice(part, 0, 1);
          var last = $strSlice(part, -1);
          if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
            throw new $SyntaxError$1("property names with quotes must have matching quotes");
          }
          if (part === "constructor" || !isOwn) {
            skipFurtherCaching = true;
          }
          intrinsicBaseName += "." + part;
          intrinsicRealName = "%" + intrinsicBaseName + "%";
          if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
            value = INTRINSICS[intrinsicRealName];
          } else if (value != null) {
            if (!(part in value)) {
              if (!allowMissing) {
                throw new $TypeError$3("base intrinsic for " + name + " exists, but the property is not available.");
              }
              return void 0;
            }
            if ($gOPD$1 && i + 1 >= parts.length) {
              var desc = $gOPD$1(value, part);
              isOwn = !!desc;
              if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
                value = desc.get;
              } else {
                value = value[part];
              }
            } else {
              isOwn = hasOwn$1(value, part);
              value = value[part];
            }
            if (isOwn && !skipFurtherCaching) {
              INTRINSICS[intrinsicRealName] = value;
            }
          }
        }
        return value;
      };
      var callBind$1 = { exports: {} };
      var GetIntrinsic$5 = getIntrinsic;
      var $defineProperty$1 = GetIntrinsic$5("%Object.defineProperty%", true);
      var hasPropertyDescriptors$1 = function hasPropertyDescriptors2() {
        if ($defineProperty$1) {
          try {
            $defineProperty$1({}, "a", { value: 1 });
            return true;
          } catch (e) {
            return false;
          }
        }
        return false;
      };
      hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
        if (!hasPropertyDescriptors$1()) {
          return null;
        }
        try {
          return $defineProperty$1([], "length", { value: 1 }).length !== 1;
        } catch (e) {
          return true;
        }
      };
      var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
      var GetIntrinsic$4 = getIntrinsic;
      var $gOPD = GetIntrinsic$4("%Object.getOwnPropertyDescriptor%", true);
      if ($gOPD) {
        try {
          $gOPD([], "length");
        } catch (e) {
          $gOPD = null;
        }
      }
      var gopd$1 = $gOPD;
      var hasPropertyDescriptors = hasPropertyDescriptors_1();
      var GetIntrinsic$3 = getIntrinsic;
      var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3("%Object.defineProperty%", true);
      if ($defineProperty) {
        try {
          $defineProperty({}, "a", { value: 1 });
        } catch (e) {
          $defineProperty = false;
        }
      }
      var $SyntaxError = GetIntrinsic$3("%SyntaxError%");
      var $TypeError$2 = GetIntrinsic$3("%TypeError%");
      var gopd = gopd$1;
      var defineDataProperty = function defineDataProperty2(obj, property, value) {
        if (!obj || typeof obj !== "object" && typeof obj !== "function") {
          throw new $TypeError$2("`obj` must be an object or a function`");
        }
        if (typeof property !== "string" && typeof property !== "symbol") {
          throw new $TypeError$2("`property` must be a string or a symbol`");
        }
        if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
          throw new $TypeError$2("`nonEnumerable`, if provided, must be a boolean or null");
        }
        if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
          throw new $TypeError$2("`nonWritable`, if provided, must be a boolean or null");
        }
        if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
          throw new $TypeError$2("`nonConfigurable`, if provided, must be a boolean or null");
        }
        if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
          throw new $TypeError$2("`loose`, if provided, must be a boolean");
        }
        var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
        var nonWritable = arguments.length > 4 ? arguments[4] : null;
        var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
        var loose = arguments.length > 6 ? arguments[6] : false;
        var desc = !!gopd && gopd(obj, property);
        if ($defineProperty) {
          $defineProperty(obj, property, {
            configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
            enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
            value,
            writable: nonWritable === null && desc ? desc.writable : !nonWritable
          });
        } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
          obj[property] = value;
        } else {
          throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
        }
      };
      var GetIntrinsic$2 = getIntrinsic;
      var define = defineDataProperty;
      var hasDescriptors = hasPropertyDescriptors_1();
      var gOPD = gopd$1;
      var $TypeError$1 = GetIntrinsic$2("%TypeError%");
      var $floor$1 = GetIntrinsic$2("%Math.floor%");
      var setFunctionLength = function setFunctionLength2(fn, length) {
        if (typeof fn !== "function") {
          throw new $TypeError$1("`fn` is not a function");
        }
        if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor$1(length) !== length) {
          throw new $TypeError$1("`length` must be a positive 32-bit integer");
        }
        var loose = arguments.length > 2 && !!arguments[2];
        var functionLengthIsConfigurable = true;
        var functionLengthIsWritable = true;
        if ("length" in fn && gOPD) {
          var desc = gOPD(fn, "length");
          if (desc && !desc.configurable) {
            functionLengthIsConfigurable = false;
          }
          if (desc && !desc.writable) {
            functionLengthIsWritable = false;
          }
        }
        if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
          if (hasDescriptors) {
            define(
              /** @type {Parameters<define>[0]} */
              fn,
              "length",
              length,
              true,
              true
            );
          } else {
            define(
              /** @type {Parameters<define>[0]} */
              fn,
              "length",
              length
            );
          }
        }
        return fn;
      };
      (function(module2) {
        var bind2 = functionBind;
        var GetIntrinsic2 = getIntrinsic;
        var setFunctionLength$1 = setFunctionLength;
        var $TypeError2 = GetIntrinsic2("%TypeError%");
        var $apply = GetIntrinsic2("%Function.prototype.apply%");
        var $call = GetIntrinsic2("%Function.prototype.call%");
        var $reflectApply = GetIntrinsic2("%Reflect.apply%", true) || bind2.call($call, $apply);
        var $defineProperty2 = GetIntrinsic2("%Object.defineProperty%", true);
        var $max = GetIntrinsic2("%Math.max%");
        if ($defineProperty2) {
          try {
            $defineProperty2({}, "a", { value: 1 });
          } catch (e) {
            $defineProperty2 = null;
          }
        }
        module2.exports = function callBind2(originalFunction) {
          if (typeof originalFunction !== "function") {
            throw new $TypeError2("a function is required");
          }
          var func = $reflectApply(bind2, $call, arguments);
          return setFunctionLength$1(
            func,
            1 + $max(0, originalFunction.length - (arguments.length - 1)),
            true
          );
        };
        var applyBind = function applyBind2() {
          return $reflectApply(bind2, $apply, arguments);
        };
        if ($defineProperty2) {
          $defineProperty2(module2.exports, "apply", { value: applyBind });
        } else {
          module2.exports.apply = applyBind;
        }
      })(callBind$1);
      var callBindExports = callBind$1.exports;
      var GetIntrinsic$1 = getIntrinsic;
      var callBind = callBindExports;
      var $indexOf = callBind(GetIntrinsic$1("String.prototype.indexOf"));
      var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
        var intrinsic = GetIntrinsic$1(name, !!allowMissing);
        if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
          return callBind(intrinsic);
        }
        return intrinsic;
      };
      const __viteBrowserExternal = {};
      const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
        __proto__: null,
        default: __viteBrowserExternal
      }, Symbol.toStringTag, { value: "Module" }));
      const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
      var hasMap = typeof Map === "function" && Map.prototype;
      var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
      var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
      var mapForEach = hasMap && Map.prototype.forEach;
      var hasSet = typeof Set === "function" && Set.prototype;
      var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
      var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
      var setForEach = hasSet && Set.prototype.forEach;
      var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
      var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
      var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
      var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
      var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
      var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
      var booleanValueOf = Boolean.prototype.valueOf;
      var objectToString = Object.prototype.toString;
      var functionToString = Function.prototype.toString;
      var $match = String.prototype.match;
      var $slice = String.prototype.slice;
      var $replace = String.prototype.replace;
      var $toUpperCase = String.prototype.toUpperCase;
      var $toLowerCase = String.prototype.toLowerCase;
      var $test = RegExp.prototype.test;
      var $concat = Array.prototype.concat;
      var $join = Array.prototype.join;
      var $arrSlice = Array.prototype.slice;
      var $floor = Math.floor;
      var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
      var gOPS = Object.getOwnPropertySymbols;
      var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
      var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
      var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
      var isEnumerable = Object.prototype.propertyIsEnumerable;
      var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
        return O.__proto__;
      } : null);
      function addNumericSeparator(num, str) {
        if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
          return str;
        }
        var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
        if (typeof num === "number") {
          var int = num < 0 ? -$floor(-num) : $floor(num);
          if (int !== num) {
            var intStr = String(int);
            var dec = $slice.call(str, intStr.length + 1);
            return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
          }
        }
        return $replace.call(str, sepRegex, "$&_");
      }
      var utilInspect = require$$0;
      var inspectCustom = utilInspect.custom;
      var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
      var objectInspect = function inspect_(obj, options, depth, seen) {
        var opts = options || {};
        if (has$3(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
          throw new TypeError('option "quoteStyle" must be "single" or "double"');
        }
        if (has$3(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
          throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
        }
        var customInspect = has$3(opts, "customInspect") ? opts.customInspect : true;
        if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
          throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
        }
        if (has$3(opts, "indent") && opts.indent !== null && opts.indent !== "	" && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
          throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
        }
        if (has$3(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
          throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
        }
        var numericSeparator = opts.numericSeparator;
        if (typeof obj === "undefined") {
          return "undefined";
        }
        if (obj === null) {
          return "null";
        }
        if (typeof obj === "boolean") {
          return obj ? "true" : "false";
        }
        if (typeof obj === "string") {
          return inspectString(obj, opts);
        }
        if (typeof obj === "number") {
          if (obj === 0) {
            return Infinity / obj > 0 ? "0" : "-0";
          }
          var str = String(obj);
          return numericSeparator ? addNumericSeparator(obj, str) : str;
        }
        if (typeof obj === "bigint") {
          var bigIntStr = String(obj) + "n";
          return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
        }
        var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
        if (typeof depth === "undefined") {
          depth = 0;
        }
        if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
          return isArray$3(obj) ? "[Array]" : "[Object]";
        }
        var indent = getIndent(opts, depth);
        if (typeof seen === "undefined") {
          seen = [];
        } else if (indexOf(seen, obj) >= 0) {
          return "[Circular]";
        }
        function inspect2(value, from, noIndent) {
          if (from) {
            seen = $arrSlice.call(seen);
            seen.push(from);
          }
          if (noIndent) {
            var newOpts = {
              depth: opts.depth
            };
            if (has$3(opts, "quoteStyle")) {
              newOpts.quoteStyle = opts.quoteStyle;
            }
            return inspect_(value, newOpts, depth + 1, seen);
          }
          return inspect_(value, opts, depth + 1, seen);
        }
        if (typeof obj === "function" && !isRegExp$1(obj)) {
          var name = nameOf(obj);
          var keys = arrObjKeys(obj, inspect2);
          return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
        }
        if (isSymbol(obj)) {
          var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
          return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
        }
        if (isElement(obj)) {
          var s = "<" + $toLowerCase.call(String(obj.nodeName));
          var attrs = obj.attributes || [];
          for (var i = 0; i < attrs.length; i++) {
            s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
          }
          s += ">";
          if (obj.childNodes && obj.childNodes.length) {
            s += "...";
          }
          s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
          return s;
        }
        if (isArray$3(obj)) {
          if (obj.length === 0) {
            return "[]";
          }
          var xs = arrObjKeys(obj, inspect2);
          if (indent && !singleLineValues(xs)) {
            return "[" + indentedJoin(xs, indent) + "]";
          }
          return "[ " + $join.call(xs, ", ") + " ]";
        }
        if (isError(obj)) {
          var parts = arrObjKeys(obj, inspect2);
          if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
            return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect2(obj.cause), parts), ", ") + " }";
          }
          if (parts.length === 0) {
            return "[" + String(obj) + "]";
          }
          return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
        }
        if (typeof obj === "object" && customInspect) {
          if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
            return utilInspect(obj, { depth: maxDepth - depth });
          } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
            return obj.inspect();
          }
        }
        if (isMap(obj)) {
          var mapParts = [];
          if (mapForEach) {
            mapForEach.call(obj, function(value, key) {
              mapParts.push(inspect2(key, obj, true) + " => " + inspect2(value, obj));
            });
          }
          return collectionOf("Map", mapSize.call(obj), mapParts, indent);
        }
        if (isSet(obj)) {
          var setParts = [];
          if (setForEach) {
            setForEach.call(obj, function(value) {
              setParts.push(inspect2(value, obj));
            });
          }
          return collectionOf("Set", setSize.call(obj), setParts, indent);
        }
        if (isWeakMap(obj)) {
          return weakCollectionOf("WeakMap");
        }
        if (isWeakSet(obj)) {
          return weakCollectionOf("WeakSet");
        }
        if (isWeakRef(obj)) {
          return weakCollectionOf("WeakRef");
        }
        if (isNumber(obj)) {
          return markBoxed(inspect2(Number(obj)));
        }
        if (isBigInt(obj)) {
          return markBoxed(inspect2(bigIntValueOf.call(obj)));
        }
        if (isBoolean(obj)) {
          return markBoxed(booleanValueOf.call(obj));
        }
        if (isString(obj)) {
          return markBoxed(inspect2(String(obj)));
        }
        if (typeof window !== "undefined" && obj === window) {
          return "{ [object Window] }";
        }
        if (obj === commonjsGlobal) {
          return "{ [object globalThis] }";
        }
        if (!isDate(obj) && !isRegExp$1(obj)) {
          var ys = arrObjKeys(obj, inspect2);
          var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
          var protoTag = obj instanceof Object ? "" : "null prototype";
          var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
          var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
          var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
          if (ys.length === 0) {
            return tag + "{}";
          }
          if (indent) {
            return tag + "{" + indentedJoin(ys, indent) + "}";
          }
          return tag + "{ " + $join.call(ys, ", ") + " }";
        }
        return String(obj);
      };
      function wrapQuotes(s, defaultStyle, opts) {
        var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
        return quoteChar + s + quoteChar;
      }
      function quote(s) {
        return $replace.call(String(s), /"/g, "&quot;");
      }
      function isArray$3(obj) {
        return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
      }
      function isDate(obj) {
        return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
      }
      function isRegExp$1(obj) {
        return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
      }
      function isError(obj) {
        return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
      }
      function isString(obj) {
        return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
      }
      function isNumber(obj) {
        return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
      }
      function isBoolean(obj) {
        return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
      }
      function isSymbol(obj) {
        if (hasShammedSymbols) {
          return obj && typeof obj === "object" && obj instanceof Symbol;
        }
        if (typeof obj === "symbol") {
          return true;
        }
        if (!obj || typeof obj !== "object" || !symToString) {
          return false;
        }
        try {
          symToString.call(obj);
          return true;
        } catch (e) {
        }
        return false;
      }
      function isBigInt(obj) {
        if (!obj || typeof obj !== "object" || !bigIntValueOf) {
          return false;
        }
        try {
          bigIntValueOf.call(obj);
          return true;
        } catch (e) {
        }
        return false;
      }
      var hasOwn = Object.prototype.hasOwnProperty || function(key) {
        return key in this;
      };
      function has$3(obj, key) {
        return hasOwn.call(obj, key);
      }
      function toStr(obj) {
        return objectToString.call(obj);
      }
      function nameOf(f) {
        if (f.name) {
          return f.name;
        }
        var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
        if (m) {
          return m[1];
        }
        return null;
      }
      function indexOf(xs, x) {
        if (xs.indexOf) {
          return xs.indexOf(x);
        }
        for (var i = 0, l = xs.length; i < l; i++) {
          if (xs[i] === x) {
            return i;
          }
        }
        return -1;
      }
      function isMap(x) {
        if (!mapSize || !x || typeof x !== "object") {
          return false;
        }
        try {
          mapSize.call(x);
          try {
            setSize.call(x);
          } catch (s) {
            return true;
          }
          return x instanceof Map;
        } catch (e) {
        }
        return false;
      }
      function isWeakMap(x) {
        if (!weakMapHas || !x || typeof x !== "object") {
          return false;
        }
        try {
          weakMapHas.call(x, weakMapHas);
          try {
            weakSetHas.call(x, weakSetHas);
          } catch (s) {
            return true;
          }
          return x instanceof WeakMap;
        } catch (e) {
        }
        return false;
      }
      function isWeakRef(x) {
        if (!weakRefDeref || !x || typeof x !== "object") {
          return false;
        }
        try {
          weakRefDeref.call(x);
          return true;
        } catch (e) {
        }
        return false;
      }
      function isSet(x) {
        if (!setSize || !x || typeof x !== "object") {
          return false;
        }
        try {
          setSize.call(x);
          try {
            mapSize.call(x);
          } catch (m) {
            return true;
          }
          return x instanceof Set;
        } catch (e) {
        }
        return false;
      }
      function isWeakSet(x) {
        if (!weakSetHas || !x || typeof x !== "object") {
          return false;
        }
        try {
          weakSetHas.call(x, weakSetHas);
          try {
            weakMapHas.call(x, weakMapHas);
          } catch (s) {
            return true;
          }
          return x instanceof WeakSet;
        } catch (e) {
        }
        return false;
      }
      function isElement(x) {
        if (!x || typeof x !== "object") {
          return false;
        }
        if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
          return true;
        }
        return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
      }
      function inspectString(str, opts) {
        if (str.length > opts.maxStringLength) {
          var remaining = str.length - opts.maxStringLength;
          var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
          return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
        }
        var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
        return wrapQuotes(s, "single", opts);
      }
      function lowbyte(c2) {
        var n = c2.charCodeAt(0);
        var x = {
          8: "b",
          9: "t",
          10: "n",
          12: "f",
          13: "r"
        }[n];
        if (x) {
          return "\\" + x;
        }
        return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
      }
      function markBoxed(str) {
        return "Object(" + str + ")";
      }
      function weakCollectionOf(type) {
        return type + " { ? }";
      }
      function collectionOf(type, size2, entries, indent) {
        var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
        return type + " (" + size2 + ") {" + joinedEntries + "}";
      }
      function singleLineValues(xs) {
        for (var i = 0; i < xs.length; i++) {
          if (indexOf(xs[i], "\n") >= 0) {
            return false;
          }
        }
        return true;
      }
      function getIndent(opts, depth) {
        var baseIndent;
        if (opts.indent === "	") {
          baseIndent = "	";
        } else if (typeof opts.indent === "number" && opts.indent > 0) {
          baseIndent = $join.call(Array(opts.indent + 1), " ");
        } else {
          return null;
        }
        return {
          base: baseIndent,
          prev: $join.call(Array(depth + 1), baseIndent)
        };
      }
      function indentedJoin(xs, indent) {
        if (xs.length === 0) {
          return "";
        }
        var lineJoiner = "\n" + indent.prev + indent.base;
        return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
      }
      function arrObjKeys(obj, inspect2) {
        var isArr = isArray$3(obj);
        var xs = [];
        if (isArr) {
          xs.length = obj.length;
          for (var i = 0; i < obj.length; i++) {
            xs[i] = has$3(obj, i) ? inspect2(obj[i], obj) : "";
          }
        }
        var syms = typeof gOPS === "function" ? gOPS(obj) : [];
        var symMap;
        if (hasShammedSymbols) {
          symMap = {};
          for (var k = 0; k < syms.length; k++) {
            symMap["$" + syms[k]] = syms[k];
          }
        }
        for (var key in obj) {
          if (!has$3(obj, key)) {
            continue;
          }
          if (isArr && String(Number(key)) === key && key < obj.length) {
            continue;
          }
          if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
            continue;
          } else if ($test.call(/[^\w$]/, key)) {
            xs.push(inspect2(key, obj) + ": " + inspect2(obj[key], obj));
          } else {
            xs.push(key + ": " + inspect2(obj[key], obj));
          }
        }
        if (typeof gOPS === "function") {
          for (var j = 0; j < syms.length; j++) {
            if (isEnumerable.call(obj, syms[j])) {
              xs.push("[" + inspect2(syms[j]) + "]: " + inspect2(obj[syms[j]], obj));
            }
          }
        }
        return xs;
      }
      var GetIntrinsic = getIntrinsic;
      var callBound = callBound$1;
      var inspect = objectInspect;
      var $TypeError = GetIntrinsic("%TypeError%");
      var $WeakMap = GetIntrinsic("%WeakMap%", true);
      var $Map = GetIntrinsic("%Map%", true);
      var $weakMapGet = callBound("WeakMap.prototype.get", true);
      var $weakMapSet = callBound("WeakMap.prototype.set", true);
      var $weakMapHas = callBound("WeakMap.prototype.has", true);
      var $mapGet = callBound("Map.prototype.get", true);
      var $mapSet = callBound("Map.prototype.set", true);
      var $mapHas = callBound("Map.prototype.has", true);
      var listGetNode = function(list, key) {
        for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
          if (curr.key === key) {
            prev.next = curr.next;
            curr.next = list.next;
            list.next = curr;
            return curr;
          }
        }
      };
      var listGet = function(objects, key) {
        var node = listGetNode(objects, key);
        return node && node.value;
      };
      var listSet = function(objects, key, value) {
        var node = listGetNode(objects, key);
        if (node) {
          node.value = value;
        } else {
          objects.next = {
            // eslint-disable-line no-param-reassign
            key,
            next: objects.next,
            value
          };
        }
      };
      var listHas = function(objects, key) {
        return !!listGetNode(objects, key);
      };
      var sideChannel = function getSideChannel2() {
        var $wm;
        var $m;
        var $o;
        var channel = {
          assert: function(key) {
            if (!channel.has(key)) {
              throw new $TypeError("Side channel does not contain " + inspect(key));
            }
          },
          get: function(key) {
            if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
              if ($wm) {
                return $weakMapGet($wm, key);
              }
            } else if ($Map) {
              if ($m) {
                return $mapGet($m, key);
              }
            } else {
              if ($o) {
                return listGet($o, key);
              }
            }
          },
          has: function(key) {
            if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
              if ($wm) {
                return $weakMapHas($wm, key);
              }
            } else if ($Map) {
              if ($m) {
                return $mapHas($m, key);
              }
            } else {
              if ($o) {
                return listHas($o, key);
              }
            }
            return false;
          },
          set: function(key, value) {
            if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
              if (!$wm) {
                $wm = new $WeakMap();
              }
              $weakMapSet($wm, key, value);
            } else if ($Map) {
              if (!$m) {
                $m = new $Map();
              }
              $mapSet($m, key, value);
            } else {
              if (!$o) {
                $o = { key: {}, next: null };
              }
              listSet($o, key, value);
            }
          }
        };
        return channel;
      };
      var replace = String.prototype.replace;
      var percentTwenties = /%20/g;
      var Format = {
        RFC1738: "RFC1738",
        RFC3986: "RFC3986"
      };
      var formats$3 = {
        "default": Format.RFC3986,
        formatters: {
          RFC1738: function(value) {
            return replace.call(value, percentTwenties, "+");
          },
          RFC3986: function(value) {
            return String(value);
          }
        },
        RFC1738: Format.RFC1738,
        RFC3986: Format.RFC3986
      };
      var formats$2 = formats$3;
      var has$2 = Object.prototype.hasOwnProperty;
      var isArray$2 = Array.isArray;
      var hexTable = function() {
        var array = [];
        for (var i = 0; i < 256; ++i) {
          array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
        }
        return array;
      }();
      var compactQueue = function compactQueue2(queue) {
        while (queue.length > 1) {
          var item = queue.pop();
          var obj = item.obj[item.prop];
          if (isArray$2(obj)) {
            var compacted = [];
            for (var j = 0; j < obj.length; ++j) {
              if (typeof obj[j] !== "undefined") {
                compacted.push(obj[j]);
              }
            }
            item.obj[item.prop] = compacted;
          }
        }
      };
      var arrayToObject = function arrayToObject2(source, options) {
        var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
        for (var i = 0; i < source.length; ++i) {
          if (typeof source[i] !== "undefined") {
            obj[i] = source[i];
          }
        }
        return obj;
      };
      var merge = function merge2(target, source, options) {
        if (!source) {
          return target;
        }
        if (typeof source !== "object") {
          if (isArray$2(target)) {
            target.push(source);
          } else if (target && typeof target === "object") {
            if (options && (options.plainObjects || options.allowPrototypes) || !has$2.call(Object.prototype, source)) {
              target[source] = true;
            }
          } else {
            return [target, source];
          }
          return target;
        }
        if (!target || typeof target !== "object") {
          return [target].concat(source);
        }
        var mergeTarget = target;
        if (isArray$2(target) && !isArray$2(source)) {
          mergeTarget = arrayToObject(target, options);
        }
        if (isArray$2(target) && isArray$2(source)) {
          source.forEach(function(item, i) {
            if (has$2.call(target, i)) {
              var targetItem = target[i];
              if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
                target[i] = merge2(targetItem, item, options);
              } else {
                target.push(item);
              }
            } else {
              target[i] = item;
            }
          });
          return target;
        }
        return Object.keys(source).reduce(function(acc, key) {
          var value = source[key];
          if (has$2.call(acc, key)) {
            acc[key] = merge2(acc[key], value, options);
          } else {
            acc[key] = value;
          }
          return acc;
        }, mergeTarget);
      };
      var assign = function assignSingleSource(target, source) {
        return Object.keys(source).reduce(function(acc, key) {
          acc[key] = source[key];
          return acc;
        }, target);
      };
      var decode = function(str, decoder, charset) {
        var strWithoutPlus = str.replace(/\+/g, " ");
        if (charset === "iso-8859-1") {
          return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
        }
        try {
          return decodeURIComponent(strWithoutPlus);
        } catch (e) {
          return strWithoutPlus;
        }
      };
      var encode = function encode2(str, defaultEncoder, charset, kind, format) {
        if (str.length === 0) {
          return str;
        }
        var string = str;
        if (typeof str === "symbol") {
          string = Symbol.prototype.toString.call(str);
        } else if (typeof str !== "string") {
          string = String(str);
        }
        if (charset === "iso-8859-1") {
          return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
            return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
          });
        }
        var out = "";
        for (var i = 0; i < string.length; ++i) {
          var c2 = string.charCodeAt(i);
          if (c2 === 45 || c2 === 46 || c2 === 95 || c2 === 126 || c2 >= 48 && c2 <= 57 || c2 >= 65 && c2 <= 90 || c2 >= 97 && c2 <= 122 || format === formats$2.RFC1738 && (c2 === 40 || c2 === 41)) {
            out += string.charAt(i);
            continue;
          }
          if (c2 < 128) {
            out = out + hexTable[c2];
            continue;
          }
          if (c2 < 2048) {
            out = out + (hexTable[192 | c2 >> 6] + hexTable[128 | c2 & 63]);
            continue;
          }
          if (c2 < 55296 || c2 >= 57344) {
            out = out + (hexTable[224 | c2 >> 12] + hexTable[128 | c2 >> 6 & 63] + hexTable[128 | c2 & 63]);
            continue;
          }
          i += 1;
          c2 = 65536 + ((c2 & 1023) << 10 | string.charCodeAt(i) & 1023);
          out += hexTable[240 | c2 >> 18] + hexTable[128 | c2 >> 12 & 63] + hexTable[128 | c2 >> 6 & 63] + hexTable[128 | c2 & 63];
        }
        return out;
      };
      var compact = function compact2(value) {
        var queue = [{ obj: { o: value }, prop: "o" }];
        var refs = [];
        for (var i = 0; i < queue.length; ++i) {
          var item = queue[i];
          var obj = item.obj[item.prop];
          var keys = Object.keys(obj);
          for (var j = 0; j < keys.length; ++j) {
            var key = keys[j];
            var val = obj[key];
            if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
              queue.push({ obj, prop: key });
              refs.push(val);
            }
          }
        }
        compactQueue(queue);
        return value;
      };
      var isRegExp = function isRegExp2(obj) {
        return Object.prototype.toString.call(obj) === "[object RegExp]";
      };
      var isBuffer = function isBuffer2(obj) {
        if (!obj || typeof obj !== "object") {
          return false;
        }
        return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
      };
      var combine = function combine2(a, b) {
        return [].concat(a, b);
      };
      var maybeMap = function maybeMap2(val, fn) {
        if (isArray$2(val)) {
          var mapped = [];
          for (var i = 0; i < val.length; i += 1) {
            mapped.push(fn(val[i]));
          }
          return mapped;
        }
        return fn(val);
      };
      var utils$2 = {
        arrayToObject,
        assign,
        combine,
        compact,
        decode,
        encode,
        isBuffer,
        isRegExp,
        maybeMap,
        merge
      };
      var getSideChannel = sideChannel;
      var utils$1 = utils$2;
      var formats$1 = formats$3;
      var has$1 = Object.prototype.hasOwnProperty;
      var arrayPrefixGenerators = {
        brackets: function brackets(prefix2) {
          return prefix2 + "[]";
        },
        comma: "comma",
        indices: function indices(prefix2, key) {
          return prefix2 + "[" + key + "]";
        },
        repeat: function repeat(prefix2) {
          return prefix2;
        }
      };
      var isArray$1 = Array.isArray;
      var push = Array.prototype.push;
      var pushToArray = function(arr, valueOrArray) {
        push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
      };
      var toISO = Date.prototype.toISOString;
      var defaultFormat = formats$1["default"];
      var defaults$1 = {
        addQueryPrefix: false,
        allowDots: false,
        charset: "utf-8",
        charsetSentinel: false,
        delimiter: "&",
        encode: true,
        encoder: utils$1.encode,
        encodeValuesOnly: false,
        format: defaultFormat,
        formatter: formats$1.formatters[defaultFormat],
        // deprecated
        indices: false,
        serializeDate: function serializeDate(date) {
          return toISO.call(date);
        },
        skipNulls: false,
        strictNullHandling: false
      };
      var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
        return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
      };
      var sentinel = {};
      var stringify$1 = function stringify2(object, prefix2, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel2) {
        var obj = object;
        var tmpSc = sideChannel2;
        var step = 0;
        var findFlag = false;
        while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
          var pos = tmpSc.get(object);
          step += 1;
          if (typeof pos !== "undefined") {
            if (pos === step) {
              throw new RangeError("Cyclic object value");
            } else {
              findFlag = true;
            }
          }
          if (typeof tmpSc.get(sentinel) === "undefined") {
            step = 0;
          }
        }
        if (typeof filter === "function") {
          obj = filter(prefix2, obj);
        } else if (obj instanceof Date) {
          obj = serializeDate(obj);
        } else if (generateArrayPrefix === "comma" && isArray$1(obj)) {
          obj = utils$1.maybeMap(obj, function(value2) {
            if (value2 instanceof Date) {
              return serializeDate(value2);
            }
            return value2;
          });
        }
        if (obj === null) {
          if (strictNullHandling) {
            return encoder && !encodeValuesOnly ? encoder(prefix2, defaults$1.encoder, charset, "key", format) : prefix2;
          }
          obj = "";
        }
        if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
          if (encoder) {
            var keyValue = encodeValuesOnly ? prefix2 : encoder(prefix2, defaults$1.encoder, charset, "key", format);
            return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults$1.encoder, charset, "value", format))];
          }
          return [formatter(prefix2) + "=" + formatter(String(obj))];
        }
        var values = [];
        if (typeof obj === "undefined") {
          return values;
        }
        var objKeys;
        if (generateArrayPrefix === "comma" && isArray$1(obj)) {
          if (encodeValuesOnly && encoder) {
            obj = utils$1.maybeMap(obj, encoder);
          }
          objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
        } else if (isArray$1(filter)) {
          objKeys = filter;
        } else {
          var keys = Object.keys(obj);
          objKeys = sort ? keys.sort(sort) : keys;
        }
        var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix2 + "[]" : prefix2;
        for (var j = 0; j < objKeys.length; ++j) {
          var key = objKeys[j];
          var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
          if (skipNulls && value === null) {
            continue;
          }
          var keyPrefix = isArray$1(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + key : "[" + key + "]");
          sideChannel2.set(object, step);
          var valueSideChannel = getSideChannel();
          valueSideChannel.set(sentinel, sideChannel2);
          pushToArray(values, stringify2(
            value,
            keyPrefix,
            generateArrayPrefix,
            commaRoundTrip,
            strictNullHandling,
            skipNulls,
            generateArrayPrefix === "comma" && encodeValuesOnly && isArray$1(obj) ? null : encoder,
            filter,
            sort,
            allowDots,
            serializeDate,
            format,
            formatter,
            encodeValuesOnly,
            charset,
            valueSideChannel
          ));
        }
        return values;
      };
      var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
        if (!opts) {
          return defaults$1;
        }
        if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
          throw new TypeError("Encoder has to be a function.");
        }
        var charset = opts.charset || defaults$1.charset;
        if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
          throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
        }
        var format = formats$1["default"];
        if (typeof opts.format !== "undefined") {
          if (!has$1.call(formats$1.formatters, opts.format)) {
            throw new TypeError("Unknown format option provided.");
          }
          format = opts.format;
        }
        var formatter = formats$1.formatters[format];
        var filter = defaults$1.filter;
        if (typeof opts.filter === "function" || isArray$1(opts.filter)) {
          filter = opts.filter;
        }
        return {
          addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
          allowDots: typeof opts.allowDots === "undefined" ? defaults$1.allowDots : !!opts.allowDots,
          charset,
          charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults$1.charsetSentinel,
          delimiter: typeof opts.delimiter === "undefined" ? defaults$1.delimiter : opts.delimiter,
          encode: typeof opts.encode === "boolean" ? opts.encode : defaults$1.encode,
          encoder: typeof opts.encoder === "function" ? opts.encoder : defaults$1.encoder,
          encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
          filter,
          format,
          formatter,
          serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults$1.serializeDate,
          skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults$1.skipNulls,
          sort: typeof opts.sort === "function" ? opts.sort : null,
          strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults$1.strictNullHandling
        };
      };
      var stringify_1 = function(object, opts) {
        var obj = object;
        var options = normalizeStringifyOptions(opts);
        var objKeys;
        var filter;
        if (typeof options.filter === "function") {
          filter = options.filter;
          obj = filter("", obj);
        } else if (isArray$1(options.filter)) {
          filter = options.filter;
          objKeys = filter;
        }
        var keys = [];
        if (typeof obj !== "object" || obj === null) {
          return "";
        }
        var arrayFormat;
        if (opts && opts.arrayFormat in arrayPrefixGenerators) {
          arrayFormat = opts.arrayFormat;
        } else if (opts && "indices" in opts) {
          arrayFormat = opts.indices ? "indices" : "repeat";
        } else {
          arrayFormat = "indices";
        }
        var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
        if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
          throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
        }
        var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip;
        if (!objKeys) {
          objKeys = Object.keys(obj);
        }
        if (options.sort) {
          objKeys.sort(options.sort);
        }
        var sideChannel2 = getSideChannel();
        for (var i = 0; i < objKeys.length; ++i) {
          var key = objKeys[i];
          if (options.skipNulls && obj[key] === null) {
            continue;
          }
          pushToArray(keys, stringify$1(
            obj[key],
            key,
            generateArrayPrefix,
            commaRoundTrip,
            options.strictNullHandling,
            options.skipNulls,
            options.encode ? options.encoder : null,
            options.filter,
            options.sort,
            options.allowDots,
            options.serializeDate,
            options.format,
            options.formatter,
            options.encodeValuesOnly,
            options.charset,
            sideChannel2
          ));
        }
        var joined = keys.join(options.delimiter);
        var prefix2 = options.addQueryPrefix === true ? "?" : "";
        if (options.charsetSentinel) {
          if (options.charset === "iso-8859-1") {
            prefix2 += "utf8=%26%2310003%3B&";
          } else {
            prefix2 += "utf8=%E2%9C%93&";
          }
        }
        return joined.length > 0 ? prefix2 + joined : "";
      };
      var utils = utils$2;
      var has = Object.prototype.hasOwnProperty;
      var isArray = Array.isArray;
      var defaults = {
        allowDots: false,
        allowPrototypes: false,
        allowSparse: false,
        arrayLimit: 20,
        charset: "utf-8",
        charsetSentinel: false,
        comma: false,
        decoder: utils.decode,
        delimiter: "&",
        depth: 5,
        ignoreQueryPrefix: false,
        interpretNumericEntities: false,
        parameterLimit: 1e3,
        parseArrays: true,
        plainObjects: false,
        strictNullHandling: false
      };
      var interpretNumericEntities = function(str) {
        return str.replace(/&#(\d+);/g, function($0, numberStr) {
          return String.fromCharCode(parseInt(numberStr, 10));
        });
      };
      var parseArrayValue = function(val, options) {
        if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
          return val.split(",");
        }
        return val;
      };
      var isoSentinel = "utf8=%26%2310003%3B";
      var charsetSentinel = "utf8=%E2%9C%93";
      var parseValues = function parseQueryStringValues(str, options) {
        var obj = { __proto__: null };
        var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
        var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
        var parts = cleanStr.split(options.delimiter, limit);
        var skipIndex = -1;
        var i;
        var charset = options.charset;
        if (options.charsetSentinel) {
          for (i = 0; i < parts.length; ++i) {
            if (parts[i].indexOf("utf8=") === 0) {
              if (parts[i] === charsetSentinel) {
                charset = "utf-8";
              } else if (parts[i] === isoSentinel) {
                charset = "iso-8859-1";
              }
              skipIndex = i;
              i = parts.length;
            }
          }
        }
        for (i = 0; i < parts.length; ++i) {
          if (i === skipIndex) {
            continue;
          }
          var part = parts[i];
          var bracketEqualsPos = part.indexOf("]=");
          var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
          var key, val;
          if (pos === -1) {
            key = options.decoder(part, defaults.decoder, charset, "key");
            val = options.strictNullHandling ? null : "";
          } else {
            key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
            val = utils.maybeMap(
              parseArrayValue(part.slice(pos + 1), options),
              function(encodedVal) {
                return options.decoder(encodedVal, defaults.decoder, charset, "value");
              }
            );
          }
          if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
            val = interpretNumericEntities(val);
          }
          if (part.indexOf("[]=") > -1) {
            val = isArray(val) ? [val] : val;
          }
          if (has.call(obj, key)) {
            obj[key] = utils.combine(obj[key], val);
          } else {
            obj[key] = val;
          }
        }
        return obj;
      };
      var parseObject = function(chain, val, options, valuesParsed) {
        var leaf = valuesParsed ? val : parseArrayValue(val, options);
        for (var i = chain.length - 1; i >= 0; --i) {
          var obj;
          var root2 = chain[i];
          if (root2 === "[]" && options.parseArrays) {
            obj = [].concat(leaf);
          } else {
            obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
            var cleanRoot = root2.charAt(0) === "[" && root2.charAt(root2.length - 1) === "]" ? root2.slice(1, -1) : root2;
            var index = parseInt(cleanRoot, 10);
            if (!options.parseArrays && cleanRoot === "") {
              obj = { 0: leaf };
            } else if (!isNaN(index) && root2 !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
              obj = [];
              obj[index] = leaf;
            } else if (cleanRoot !== "__proto__") {
              obj[cleanRoot] = leaf;
            }
          }
          leaf = obj;
        }
        return leaf;
      };
      var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
        if (!givenKey) {
          return;
        }
        var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
        var brackets = /(\[[^[\]]*])/;
        var child = /(\[[^[\]]*])/g;
        var segment = options.depth > 0 && brackets.exec(key);
        var parent = segment ? key.slice(0, segment.index) : key;
        var keys = [];
        if (parent) {
          if (!options.plainObjects && has.call(Object.prototype, parent)) {
            if (!options.allowPrototypes) {
              return;
            }
          }
          keys.push(parent);
        }
        var i = 0;
        while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
          i += 1;
          if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
            if (!options.allowPrototypes) {
              return;
            }
          }
          keys.push(segment[1]);
        }
        if (segment) {
          keys.push("[" + key.slice(segment.index) + "]");
        }
        return parseObject(keys, val, options, valuesParsed);
      };
      var normalizeParseOptions = function normalizeParseOptions2(opts) {
        if (!opts) {
          return defaults;
        }
        if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
          throw new TypeError("Decoder has to be a function.");
        }
        if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
          throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
        }
        var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
        return {
          allowDots: typeof opts.allowDots === "undefined" ? defaults.allowDots : !!opts.allowDots,
          allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
          allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
          arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
          charset,
          charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
          comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
          decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
          delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
          // eslint-disable-next-line no-implicit-coercion, no-extra-parens
          depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
          ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
          interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
          parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
          parseArrays: opts.parseArrays !== false,
          plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
          strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
        };
      };
      var parse$1 = function(str, opts) {
        var options = normalizeParseOptions(opts);
        if (str === "" || str === null || typeof str === "undefined") {
          return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
        }
        var tempObj = typeof str === "string" ? parseValues(str, options) : str;
        var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
        var keys = Object.keys(tempObj);
        for (var i = 0; i < keys.length; ++i) {
          var key = keys[i];
          var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
          obj = utils.merge(obj, newObj, options);
        }
        if (options.allowSparse === true) {
          return obj;
        }
        return utils.compact(obj);
      };
      var stringify = stringify_1;
      var parse = parse$1;
      var formats = formats$3;
      var lib = {
        formats,
        parse,
        stringify
      };
      const qs = /* @__PURE__ */ getDefaultExportFromCjs(lib);
      const axiosInstance = axios$1.create({
        // 配置请求超时时间
        timeout: 1e4,
        // 如果用的JSONP，可以配置此参数带上cookie凭证，如果是代理和CORS不用设置
        withCredentials: true
      });
      axiosInstance.interceptors.request.use((config) => {
        const R_USERNAME = api.get("R_USERNAME");
        const R_SESS = api.get("R_SESS");
        const CSRF = api.get("CSRF");
        config.headers["Cookie"] = `R_USERNAME=${R_USERNAME};CSRF=${CSRF};R_SESS=${R_SESS}`;
        config.headers["x-api-csrf"] = CSRF;
        return config;
      });
      const post = async (url, params) => {
        return await axiosInstance.post(url, qs.stringify(params, {}));
      };
      const request = async (action) => {
        let url = window.location.href.replace(/\/p\//g, "/v3/project/");
        url = url.replace(/\/workload\//g, "/workloads/");
        return await post(`${url}?action=${action}`);
      };
      const redeploy = async () => {
        return await request("redeploy");
      };
      const _export_sfc = (sfc, props) => {
        const target = sfc.__vccOpts || sfc;
        for (const [key, val] of props) {
          target[key] = val;
        }
        return target;
      };
      const _hoisted_1 = { id: "main" };
      const _sfc_main$1 = {
        __name: "Main",
        setup(__props) {
          const { message } = createDiscreteApi(["message"]);
          const pageLoaded = vue.ref(false);
          vue.onMounted(() => {
            setInterval(() => {
              pageLoaded.value = $("#loading-underlay").css("display") === "none";
            }, 100);
          });
          const changePod = (operate = "add") => {
            const operateBtn = $(
              `.btn[data-ember-action-${operate === "add" ? "28" : "27"}]`
            );
            if (operateBtn.length > 0) {
              operateBtn.click();
              message.success(`已${operate === "add" ? "增加" : "减少"}实例`);
            } else {
              message.warning("没有找到增加/减少实例的按钮,可能页面还没有加载完毕");
            }
          };
          const getIp = () => {
            const status = $(".main-row td[data-title='状态: '] span").text().trim();
            if (status === "Running") {
              const containerDetail = $(".main-row td[data-title='镜像: '] p.clip").text().trim();
              const ip = containerDetail.match(/\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/);
              navigator.clipboard.writeText(ip[0]);
              message.success(`IP: ${ip[0]} 已复制到剪切板`);
            } else {
              message.warning("没有找到运行中的容器,可能页面还没有加载完毕");
            }
          };
          const cutEnv = (env) => {
            const constant2 = {
              dev: "fjlvf",
              test2: "v4b48",
              test1: "m5xcv"
            };
            const url = window.location.href;
            const envRegex = /p-(\w+)/;
            const deploymentRegex = /deployment:(\w+)/;
            window.location.href = url.replace(envRegex, `p-${constant2[env]}`).replace(deploymentRegex, `deployment:${env}`);
          };
          const doRedeploy = () => {
            redeploy();
          };
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
              vue.createVNode(vue.unref(NSpin), {
                show: !pageLoaded.value
              }, {
                description: vue.withCtx(() => [
                  vue.createTextVNode(" 页面加载中... ")
                ]),
                default: vue.withCtx(() => [
                  vue.createVNode(vue.unref(NCollapse), { "default-expanded-names": "1" }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(vue.unref(NCollapseItem), {
                        title: "Rancher工具",
                        name: "1"
                      }, {
                        default: vue.withCtx(() => [
                          vue.createVNode(vue.unref(NSpace), null, {
                            default: vue.withCtx(() => [
                              vue.createVNode(vue.unref(NButton), {
                                type: "primary",
                                onClick: _cache[0] || (_cache[0] = ($event) => getIp()),
                                size: "tiny"
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode(" 获取IP ")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          }),
                          vue.createVNode(vue.unref(NSpace), { style: { "margin-top": "5px" } }, {
                            default: vue.withCtx(() => [
                              vue.createVNode(vue.unref(NButton), {
                                type: "info",
                                onClick: _cache[1] || (_cache[1] = ($event) => changePod("add")),
                                size: "tiny"
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode(" 增加实例 ")
                                ]),
                                _: 1
                              }),
                              vue.createVNode(vue.unref(NButton), {
                                type: "error",
                                onClick: _cache[2] || (_cache[2] = ($event) => changePod("reduce")),
                                size: "tiny"
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode(" 减少实例 ")
                                ]),
                                _: 1
                              }),
                              vue.createVNode(vue.unref(NButton), {
                                type: "warning",
                                onClick: _cache[3] || (_cache[3] = ($event) => doRedeploy()),
                                size: "tiny"
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode(" 重新部署 ")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          }),
                          vue.createVNode(vue.unref(NSpace), { style: { "margin-top": "5px" } }, {
                            default: vue.withCtx(() => [
                              vue.createVNode(vue.unref(NButton), {
                                type: "primary",
                                onClick: _cache[4] || (_cache[4] = ($event) => cutEnv("dev")),
                                size: "tiny",
                                dashed: ""
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode(" 开发环境 ")
                                ]),
                                _: 1
                              }),
                              vue.createVNode(vue.unref(NButton), {
                                type: "info",
                                onClick: _cache[5] || (_cache[5] = ($event) => cutEnv("test2")),
                                size: "tiny",
                                dashed: ""
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode(" 测试环境2 ")
                                ]),
                                _: 1
                              }),
                              vue.createVNode(vue.unref(NButton), {
                                type: "warning",
                                onClick: _cache[6] || (_cache[6] = ($event) => cutEnv("test1")),
                                size: "tiny",
                                dashed: ""
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode(" 测试环境1 ")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["show"])
            ]);
          };
        }
      };
      const RancherAutoIp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-60cddf3d"]]);
      const _sfc_main = {
        __name: "App",
        setup(__props) {
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createBlock(RancherAutoIp);
          };
        }
      };
      vue.createApp(_sfc_main).mount(
        (() => {
          const app = document.createElement("div");
          document.body.append(app);
          return app;
        })()
      );
    }
  });
  require_main_001();

})(Vue);